From 252af3e58cfc58cd75a0a714f822b39d8c706f2c Mon Sep 17 00:00:00 2001 From: Denis Merigoux Date: Fri, 4 Feb 2022 12:12:09 +0100 Subject: [PATCH] Better ninja file --- .gitignore | 1 + build.ninja | 26 +++++++++++--------------- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/.gitignore b/.gitignore index 8e5891af..a500d161 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ compiler/**/.merlin legifrance_oauth* *.html .vscode/ +.ninja_* diff --git a/build.ninja b/build.ninja index f41dd2d4..e13e241a 100644 --- a/build.ninja +++ b/build.ninja @@ -1,22 +1,18 @@ rule test_scope - command = catala -s $scope Interpret $in --unstyled 2>&1 $ - | colordiff -u -b $out - + command = _build/default/compiler/catala.exe -s $scope Interpret $tested_file --unstyled 2>&1 $ + | colordiff -u -b $expected_output - + description = Testing scope $scope of file $tested_file -build tests/test_array/good/output/aggregation_2.catala_en.A.Interpret:$ - test_scope $ - tests/test_array/good/aggregation_2.catala_en +build test1: test_scope scope = A + tested_file = tests/test_array/good/aggregation_2.catala_en + expected_output = tests/test_array/good/output/aggregation_2.catala_en.A.Interpret -build tests/test_array/good/output/aggregation_2.catala_en.B.Interpret:$ - test_scope $ - tests/test_array/good/aggregation_2.catala_en +build test2: test_scope scope = B + expected_output = tests/test_array/good/output/aggregation_2.catala_en.B.Interpret + tested_file = tests/test_array/good/aggregation_2.catala_en -build always: phony - -build test: phony $ - tests/test_array/good/output/aggregation_2.catala_en.A.Interpret $ - tests/test_array/good/output/aggregation_2.catala_en.B.Interpret - -build test2: phony test +build test: phony test1 test2 +default test