Skip to content

Commit

Permalink
#810 zipped NRT input files should be in a distinct directory to avoi…
Browse files Browse the repository at this point in the history
…d being erased when the input archive is unzipped

Signed-off-by: Dimitri Baron <[email protected]>
  • Loading branch information
barondim committed Jan 23, 2025
1 parent 84599e1 commit 830d8ab
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 3 deletions.
5 changes: 4 additions & 1 deletion cmake/TestMain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@
#

if(${USE_ZIP} STREQUAL "YES")
execute_process(COMMAND zip -j res/${TEST_NAME}.zip res/TestIIDM_${TEST_NAME}.iidm res/config_${TEST_NAME}.json)
# clean-up : delete the zip archive and the previous unzipped files
execute_process(COMMAND rm -f res/${TEST_NAME}.zip res/TestIIDM_${TEST_NAME}.iidm res/config_${TEST_NAME}.json)

execute_process(COMMAND zip -j res/${TEST_NAME}.zip res/res_to_zip/TestIIDM_${TEST_NAME}.iidm res/res_to_zip/config_${TEST_NAME}.json)
set(_command ${EXE} --network=TestIIDM_${TEST_NAME}.iidm --config=config_${TEST_NAME}.json --input-archive=res/${TEST_NAME}.zip)
else()
set(_command ${EXE} --network=res/TestIIDM_${TEST_NAME}.iidm --config=res/config_${TEST_NAME}.json)
Expand Down
5 changes: 4 additions & 1 deletion cmake/TestMainNSA.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@
#

if(${USE_ZIP} STREQUAL "YES")
execute_process(COMMAND zip -j res/${TEST_NAME}.zip res/TestIIDM_${TEST_NAME}.iidm res/config_${TEST_NAME}.json res/contingencies_${TEST_NAME}.json)
# clean-up : delete the zip archive and the previous unzipped files
execute_process(COMMAND rm -f res/${TEST_NAME}.zip res/TestIIDM_${TEST_NAME}.iidm res/config_${TEST_NAME}.json res/contingencies_${TEST_NAME}.json)

execute_process(COMMAND zip -j res/${TEST_NAME}.zip res/res_to_zip/TestIIDM_${TEST_NAME}.iidm res/res_to_zip/config_${TEST_NAME}.json res/res_to_zip/contingencies_${TEST_NAME}.json)
set(_dfl_cmd ${EXE} --network=TestIIDM_${TEST_NAME}.iidm --config=config_${TEST_NAME}.json --contingencies=contingencies_${TEST_NAME}.json --input-archive=res/${TEST_NAME}.zip --nsa)
else()
set(_dfl_cmd ${EXE} --network=res/TestIIDM_${TEST_NAME}.iidm --config=res/config_${TEST_NAME}.json --contingencies=res/contingencies_${TEST_NAME}.json --nsa)
Expand Down
5 changes: 4 additions & 1 deletion cmake/TestMainSA.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@
#

if(${USE_ZIP} STREQUAL "YES")
execute_process(COMMAND zip -j res/${TEST_NAME}.zip res/TestIIDM_${TEST_NAME}.iidm res/config_${TEST_NAME}.json res/contingencies_${TEST_NAME}.json)
# clean-up : delete the zip archive and the previous unzipped files
execute_process(COMMAND rm -f res/${TEST_NAME}.zip res/TestIIDM_${TEST_NAME}.iidm res/config_${TEST_NAME}.json res/contingencies_${TEST_NAME}.json)

execute_process(COMMAND zip -j res/${TEST_NAME}.zip res/res_to_zip/TestIIDM_${TEST_NAME}.iidm res/res_to_zip/config_${TEST_NAME}.json res/res_to_zip/contingencies_${TEST_NAME}.json)
set(_dfl_cmd ${EXE} --network=TestIIDM_${TEST_NAME}.iidm --config=config_${TEST_NAME}.json --contingencies=contingencies_${TEST_NAME}.json --input-archive=res/${TEST_NAME}.zip)
else ()
set(_dfl_cmd ${EXE} --network=res/TestIIDM_${TEST_NAME}.iidm --config=res/config_${TEST_NAME}.json --contingencies=res/contingencies_${TEST_NAME}.json)
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 830d8ab

Please sign in to comment.