Skip to content

Commit f7f9de7

Browse files
authored
Series-Relative Test IDs (#895)
* Replace test ID path with UUID path * Miscellaneous changes * Fix unit test * Fix cancel_tests unit test * Fix cancel_invalid_test unit test * Fix logging tests * Fix arg_filtered_tests unit test * Fix list_cmd unit tests * Fix index unit test * Pass more unit tests * Fix even more unit tests * Fix legacy unit test * Fix add_module unit test * Fix style issues * Add validation to TestIDs * Various changes to integrate TestID * Various changes * Fix graph command ID parsing * Fixing IDs * Progress towards fixing unit tests * Fix group unit tests * Fix bug in LazyTestRunDict * Fix cancel command unit tests * Fix cat unit tests * Fix graph command unit tests * Fix list command unit tests * Fix log command unit tests * Fix result command unit tests * Update cmd_utils to work with ID objects * Fix logging unit tests * Fix run command unit tests * Fix series command tests * Fix cancel command tests * Fix series unit tests * Fix status command unit tests * Fix remaining unit tests * Refactor arg_filtered_tests * Refactor arg_filtered_series * Various changes * More ID tweaks * Make host_cpus plugin platform independent * Make sys_vars platform independent * Fix style issue * Fix style issues * Ignore wrapped lines * Fix group commands unit test * Fix line wrapping causing unit test to fail * Try to fix group tests * Try to fix CI wrapping breaking unit tests * Add --json option to group members subcommand * Fix syntax errors * JSON output for group members * Add GroupID to serializer * Fix TestID deserializer * Fix JSON output * Fix group command unit tests * Remove debug statements * Fix rebase * Fix join * Remove stray print statement
1 parent 4d7a6fa commit f7f9de7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+1134
-960
lines changed

.github/workflows/unittests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ jobs:
4040
4141
# Set run_tests to run only the specific tests you need to fix.
4242
- name: run_tests
43+
env:
44+
COLUMNS: 120
45+
LINES: 40
4346
run: |
4447
./test/run_tests
4548

lib/pavilion/builder.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ def build(self, test_id: str, tracker: BuildTracker,
460460
directory into our test directory, and note that we've used the given
461461
build.
462462
463-
:param test_id: The test 'full_id' for the test initiating this build.
463+
:param test_id: The test id for the test initiating this build.
464464
:param tracker: A thread-safe tracker object for keeping info on what the
465465
build is doing.
466466
:param cancel_event: Allows builds to tell each other
@@ -570,7 +570,7 @@ def _build(self, build_dir, cancel_event, test_id, tracker: BuildTracker) -> boo
570570
:param Path build_dir: The directory in which to perform the build.
571571
:param threading.Event cancel_event: Event to signal that the build
572572
should stop.
573-
:param test_id: The 'full_id' of the test initiating the build.
573+
:param test_id: The ID of the test initiating the build.
574574
:param tracker: Build tracker for this build.
575575
:returns: True or False, depending on whether the build appears to have
576576
been successful.
@@ -592,7 +592,8 @@ def _build(self, build_dir, cancel_event, test_id, tracker: BuildTracker) -> boo
592592
# Do the build, and wait for it to complete.
593593
with self.tmp_log_path.open('w') as build_log:
594594
# Build scripts take the test id as a first argument.
595-
cmd = [self._script_path.as_posix(), test_id]
595+
cmd = [self._script_path.as_posix(), str(test_id)]
596+
596597
proc = subprocess.Popen(cmd,
597598
cwd=build_dir.as_posix(),
598599
stdout=build_log,
@@ -797,10 +798,6 @@ def _setup_build_dir(self, dest: Path, tracker: BuildTracker) -> None:
797798
raise TestBuilderError("Error extracting file '{}'\n {}"
798799
.format(src_path.as_posix(), extract_error))
799800

800-
tracker.update(
801-
state=STATES.BUILDING,
802-
note="Generating dynamically created files.")
803-
804801
# Create build time file(s).
805802
for file, contents in self._config.get('create_files', {}).items():
806803
try:

lib/pavilion/cancel_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def cancel_tests(pav_cfg: PavConfig, tests: Iterable[TestRun], outfile: TextIO,
100100
title="Cancelling {} test{}".format(test_count, 's' if test_count > 1 else ''),
101101
outfile=outfile,
102102
fields=['name', 'id', 'state', 'series'],
103-
rows=[{'name': test.name, 'id': test.full_id,
103+
rows=[{'name': test.name, 'id': test.id,
104104
'state': test.status.current().state, 'series': test.series}
105105
for test in cancelled_test_info])
106106
else:

0 commit comments

Comments
 (0)