From 4dd23e8685c43df0a533fcec08a2899f5998a546 Mon Sep 17 00:00:00 2001 From: Lionel GUEZ <guez@lmd.ens.fr> Date: Fri, 21 Jan 2022 19:31:39 +0100 Subject: [PATCH] Use the env keyword of `test_compare.py` Use the env keyword of `test_compare.py` rather than setting env on the command line. This seems a little clearer and it allows us to remove the stdout line in the test description. The possibility to add env was added to `test_compare.py` in commit 4964d767 of the `Test_compare` repository, after replacing mpiexec by `$mpiexec` in `eddy_graph.sh`, in commit 850efa4b of the present repository. --- Overlap/Tests/short_tests.json | 90 +++++++++------------------------- 1 file changed, 23 insertions(+), 67 deletions(-) diff --git a/Overlap/Tests/short_tests.json b/Overlap/Tests/short_tests.json index dae5256e..9a7566c4 100644 --- a/Overlap/Tests/short_tests.json +++ b/Overlap/Tests/short_tests.json @@ -228,10 +228,8 @@ { "input": "&MAIN_NML /\n", "title": "Eddy_graph", - "stdout": "eddy_graph_stdout.txt", + "env": {"mpiexec": "$mpiexec"}, "command": [ - "env", - "mpiexec=$mpiexec", "$build_dir/Overlap/eddy_graph.sh", "1", "$tests_old_dir/Inst_eddies_loop/SHPC_cyclo" @@ -241,10 +239,8 @@ "input": "&MAIN_NML /\n", "description": "Same as Eddy_graph but with 2 processes.", "title": "Eddy_graph_2", - "stdout": "eddy_graph_stdout.txt", + "env": {"mpiexec": "$mpiexec"}, "command": [ - "env", - "mpiexec=$mpiexec", "$build_dir/Overlap/eddy_graph.sh", "2", "$tests_old_dir/Inst_eddies_loop/SHPC_cyclo" @@ -254,10 +250,8 @@ "input": "&MAIN_NML MAX_DELTA = 2 /\n", "description": "Same as Eddy_graph but with max_delta = 2.", "title": "Eddy_graph_md2", - "stdout": "eddy_graph_stdout.txt", + "env": {"mpiexec": "$mpiexec"}, "command": [ - "env", - "mpiexec=$mpiexec", "$build_dir/Overlap/eddy_graph.sh", "1", "$tests_old_dir/Inst_eddies_loop/SHPC_cyclo" @@ -267,10 +261,8 @@ "input": "&MAIN_NML n_dates = 4/\n", "description": "Eddy_graph with a larger region.", "title": "Eddy_graph_region_2", - "stdout": "eddy_graph_stdout.txt", + "env": {"mpiexec": "$mpiexec"}, "command": [ - "env", - "mpiexec=$mpiexec", "$build_dir/Overlap/eddy_graph.sh", "1", "$tests_old_dir/Extraction_eddies_region_2_noise/SHPC_anti" @@ -280,10 +272,8 @@ "input": "&MAIN_NML n_dates = 4/\n", "description": "Same as Eddy_graph_region_2 but with 2 processes.", "title": "Eddy_graph_region_2_2", - "stdout": "eddy_graph_stdout.txt", + "env": {"mpiexec": "$mpiexec"}, "command": [ - "env", - "mpiexec=$mpiexec", "$build_dir/Overlap/eddy_graph.sh", "2", "$tests_old_dir/Extraction_eddies_region_2_noise/SHPC_anti" @@ -293,10 +283,8 @@ "input": "&MAIN_NML n_dates = 4, max_delta = 2/\n", "description": "Same as Eddy_graph_region_2 but with max_delta = 2.", "title": "Eddy_graph_r2md2", - "stdout": "eddy_graph_stdout.txt", + "env": {"mpiexec": "$mpiexec"}, "command": [ - "env", - "mpiexec=$mpiexec", "$build_dir/Overlap/eddy_graph.sh", "1", "$tests_old_dir/Extraction_eddies_region_2_noise/SHPC_anti" @@ -306,10 +294,8 @@ "input": "&MAIN_NML n_dates = 4, max_delta = 3/\n", "description": "Same as Eddy_graph_region_2 but with max_delta = 3.", "title": "Eddy_graph_r2md3", - "stdout": "eddy_graph_stdout.txt", + "env": {"mpiexec": "$mpiexec"}, "command": [ - "env", - "mpiexec=$mpiexec", "$build_dir/Overlap/eddy_graph.sh", "1", "$tests_old_dir/Extraction_eddies_region_2_noise/SHPC_anti" @@ -319,10 +305,8 @@ "input": "&MAIN_NML n_dates = 5, max_delta = 3/\n", "description": "Same as Eddy_graph_r2md3 but with n_dates = 5.", "title": "Eddy_graph_r2nd5md3", - "stdout": "eddy_graph_stdout.txt", - "command": [ - "env", - "mpiexec=$mpiexec", + "env": {"mpiexec": "$mpiexec"}, + "command": [ "$build_dir/Overlap/eddy_graph.sh", "1", "$tests_old_dir/Extraction_eddies_region_2_noise/SHPC_anti" @@ -332,10 +316,8 @@ "input": "&MAIN_NML n_dates = 5, max_delta = 4/\n", "description": "Same as Eddy_graph_r2nd5md3 but with max_delta = 4.", "title": "EGr2nd5md4", - "stdout": "eddy_graph_stdout.txt", + "env": {"mpiexec": "$mpiexec"}, "command": [ - "env", - "mpiexec=$mpiexec", "$build_dir/Overlap/eddy_graph.sh", "1", "$tests_old_dir/Extraction_eddies_region_2_noise/SHPC_anti" @@ -345,10 +327,8 @@ "input": "&MAIN_NML n_dates = 6, max_delta = 4/\n", "description": "Same as EGr2nd5md4 but with n_dates = 6.", "title": "EGr2nd6md4", - "stdout": "eddy_graph_stdout.txt", + "env": {"mpiexec": "$mpiexec"}, "command": [ - "env", - "mpiexec=$mpiexec", "$build_dir/Overlap/eddy_graph.sh", "1", "$tests_old_dir/Extraction_eddies_region_2_noise/SHPC_anti" @@ -358,10 +338,8 @@ "input": "&MAIN_NML n_dates = 6/\n", "description": "Same as EGr2nd6md4 but with max_delta = 1.", "title": "EGr2nd6md1", - "stdout": "eddy_graph_stdout.txt", + "env": {"mpiexec": "$mpiexec"}, "command": [ - "env", - "mpiexec=$mpiexec", "$build_dir/Overlap/eddy_graph.sh", "1", "$tests_old_dir/Extraction_eddies_region_2_noise/SHPC_anti" @@ -371,10 +349,8 @@ "input": "&MAIN_NML n_dates = 6/\n", "description": "Same as EGr2nd6md1 but with 2 processes.", "title": "EGr2nd6md1np2", - "stdout": "eddy_graph_stdout.txt", + "env": {"mpiexec": "$mpiexec"}, "command": [ - "env", - "mpiexec=$mpiexec", "$build_dir/Overlap/eddy_graph.sh", "2", "$tests_old_dir/Extraction_eddies_region_2_noise/SHPC_anti" @@ -384,10 +360,8 @@ "input": "&MAIN_NML n_dates = 6/\n", "description": "Same as EGr2nd6md1 but with 3 processes.", "title": "EGr2nd6md1np3", - "stdout": "eddy_graph_stdout.txt", + "env": {"mpiexec": "$mpiexec"}, "command": [ - "env", - "mpiexec=$mpiexec", "$build_dir/Overlap/eddy_graph.sh", "3", "$tests_old_dir/Extraction_eddies_region_2_noise/SHPC_anti" @@ -397,10 +371,8 @@ "input": "&MAIN_NML /\n", "description": "Same as EGr2nd6md1 but with all the 15 dates.", "title": "EGr2nd15md1", - "stdout": "eddy_graph_stdout.txt", + "env": {"mpiexec": "$mpiexec"}, "command": [ - "env", - "mpiexec=$mpiexec", "$build_dir/Overlap/eddy_graph.sh", "1", "$tests_old_dir/Extraction_eddies_region_2_noise/SHPC_anti" @@ -410,10 +382,8 @@ "input": "&MAIN_NML max_delta = 2 /\n", "description": "Same as EGr2nd15md1 but with max_delta = 2.", "title": "EGr2nd15md2", - "stdout": "eddy_graph_stdout.txt", + "env": {"mpiexec": "$mpiexec"}, "command": [ - "env", - "mpiexec=$mpiexec", "$build_dir/Overlap/eddy_graph.sh", "1", "$tests_old_dir/Extraction_eddies_region_2_noise/SHPC_anti" @@ -423,10 +393,8 @@ "input": "&MAIN_NML max_delta = 3 /\n", "description": "Same as EGr2nd15md1 but with max_delta = 3.", "title": "EGr2nd15md3", - "stdout": "eddy_graph_stdout.txt", + "env": {"mpiexec": "$mpiexec"}, "command": [ - "env", - "mpiexec=$mpiexec", "$build_dir/Overlap/eddy_graph.sh", "1", "$tests_old_dir/Extraction_eddies_region_2_noise/SHPC_anti" @@ -436,10 +404,8 @@ "input": "&MAIN_NML max_delta = 4 /\n", "description": "Same as EGr2nd15md1 but with max_delta = 4.", "title": "EGr2nd15md4", - "stdout": "eddy_graph_stdout.txt", + "env": {"mpiexec": "$mpiexec"}, "command": [ - "env", - "mpiexec=$mpiexec", "$build_dir/Overlap/eddy_graph.sh", "1", "$tests_old_dir/Extraction_eddies_region_2_noise/SHPC_anti" @@ -449,10 +415,8 @@ "input": "&MAIN_NML max_delta = 4 /\n", "description": "Same as EGr2nd15md4 but with 2 processes.", "title": "EGr2nd15md4np2", - "stdout": "eddy_graph_stdout.txt", + "env": {"mpiexec": "$mpiexec"}, "command": [ - "env", - "mpiexec=$mpiexec", "$build_dir/Overlap/eddy_graph.sh", "2", "$tests_old_dir/Extraction_eddies_region_2_noise/SHPC_anti" @@ -462,10 +426,8 @@ "input": "&MAIN_NML max_delta = 4 /\n", "description": "Same as EGr2nd15md4 but with 3 processes.", "title": "EGr2nd15md4np3", - "stdout": "eddy_graph_stdout.txt", + "env": {"mpiexec": "$mpiexec"}, "command": [ - "env", - "mpiexec=$mpiexec", "$build_dir/Overlap/eddy_graph.sh", "3", "$tests_old_dir/Extraction_eddies_region_2_noise/SHPC_anti" @@ -475,10 +437,8 @@ "input": "&MAIN_NML max_delta = 4 /\n", "description": "Same as EGr2nd15md4np3 but for cyclones.", "title": "EGr2nd15md4np3_cyclo", - "stdout": "eddy_graph_stdout.txt", + "env": {"mpiexec": "$mpiexec"}, "command": [ - "env", - "mpiexec=$mpiexec", "$build_dir/Overlap/eddy_graph.sh", "3", "$tests_old_dir/Extraction_eddies_region_2_noise/SHPC_cyclo" @@ -488,10 +448,8 @@ "input": "&MAIN_NML max_delta = 4 /\n", "description": "Same as EGr2nd15md4 but with a larger region.", "title": "EGr5np1", - "stdout": "eddy_graph_stdout.txt", + "env": {"mpiexec": "$mpiexec"}, "command": [ - "env", - "mpiexec=$mpiexec", "$build_dir/Overlap/eddy_graph.sh", "1", "$PWD/Inst_eddies_4_anti" @@ -501,10 +459,8 @@ "input": "&MAIN_NML max_delta = 4 /\n", "description": "Same as EGr5np1 but with 3 processes.", "title": "EGr5np3", - "stdout": "eddy_graph_stdout.txt", + "env": {"mpiexec": "$mpiexec"}, "command": [ - "env", - "mpiexec=$mpiexec", "$build_dir/Overlap/eddy_graph.sh", "3", "$PWD/Inst_eddies_4_anti" -- GitLab