From ddd74bec3875c86d7da8fa75d308f5d06be4ad72 Mon Sep 17 00:00:00 2001 From: marek Date: Fri, 19 Aug 2022 18:33:56 -0400 Subject: [PATCH] radeonsi/ci: make the running script easy to use Changes: - No path parameters are needed to run all tests. - All test results are stored next to cloned repos instead of /tmp. This is a personal preference, though not necessary. The new setup guide is going to be: - mesa, piglit, deqp, and glcts directories must be next to each other. - Add `PATH=$HOME/?/mesa/src/gallium/drivers/radeonsi/ci:$PATH` into `.bashrc`. Replace `?` with the proper path. - Install Rust, which will include its package manager Cargo: https://www.rust-lang.org/tools/install - The installer will add the Cargo environment into `.bashrc`, which will add cargo into `PATH`. - Restart bash to get the new `PATH`. - Run: `cargo install deqp-runner` Reviewed-by: Pierre-Eric Pelloux-Prayer The parameters setting the various paths won't be explained to keep the guide short. The path parameters and env vars can be removed if everybody stops using them after this. Part-of: --- .../drivers/radeonsi/ci/radeonsi-run-tests.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/radeonsi/ci/radeonsi-run-tests.py b/src/gallium/drivers/radeonsi/ci/radeonsi-run-tests.py index d47c29a602e..8420d4f44d7 100755 --- a/src/gallium/drivers/radeonsi/ci/radeonsi-run-tests.py +++ b/src/gallium/drivers/radeonsi/ci/radeonsi-run-tests.py @@ -64,6 +64,10 @@ parser.add_argument( help="Number of processes/threads to use.", default=multiprocessing.cpu_count(), ) + +# The path to above the mesa directory, i.e. ../../../../../.. +path_above_mesa = os.path.realpath(os.path.join(os.path.dirname(__file__), *['..'] * 6)) + parser.add_argument("--piglit-path", type=str, help="Path to piglit source folder.") parser.add_argument("--glcts-path", type=str, help="Path to GLCTS source folder.") parser.add_argument("--deqp-path", type=str, help="Path to dEQP source folder.") @@ -71,7 +75,7 @@ parser.add_argument( "--parent-path", type=str, help="Path to folder containing piglit/GLCTS and dEQP source folders.", - default=os.getenv("MAREKO_BUILD_PATH"), + default=os.getenv('MAREKO_BUILD_PATH', path_above_mesa), ) parser.add_argument("--verbose", "-v", action="count", default=0) parser.add_argument( @@ -138,7 +142,9 @@ parser.add_argument( nargs="?", help="Output folder (logs, etc)", default=os.path.join( - tempfile.gettempdir(), datetime.now().strftime("%Y-%m-%d-%H-%M-%S") + # Default is ../../../../../../test-results/datetime + os.path.join(path_above_mesa, 'test-results', + datetime.now().strftime("%Y-%m-%d-%H-%M-%S")) ), ) @@ -246,7 +252,7 @@ while os.path.exists(output_folder): output_folder = "{}.{}".format(os.path.abspath(args.output_folder), count) count += 1 -os.mkdir(output_folder) +os.makedirs(output_folder, exist_ok=True) new_baseline_folder = os.path.join(output_folder, "new_baseline") os.mkdir(new_baseline_folder)