Skip to content

Commit

Permalink
Merge pull request #481 from NOAA-FIMS/317-bug-remove-test-data-from-…
Browse files Browse the repository at this point in the history
…fims-deterministic-folder

Remove test data from fims deterministic folder
  • Loading branch information
ChristineStawitz-NOAA authored Oct 24, 2023
2 parents 61d1ddb + 29ead81 commit e18f15f
Show file tree
Hide file tree
Showing 12 changed files with 11 additions and 809 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/run-googletest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ jobs:
matrix:
# Use windows-2019 instead of windows-latest to avoid using Mingw-w64
os: [ubuntu-latest, macos-latest, windows-2019]
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v3
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ src/tmp.def

#Testing files
tests/test_plan/FIMS_Integration_Test_Plan.log
tests/integration/FIMS-deterministic-inputs/

#vignettes
inst/doc
Expand Down
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ EXECUTE_PROCESS(

MESSAGE(STATUS "R_HOME is ${R_HOME}")

EXECUTE_PROCESS(
COMMAND R "--slave" "--no-save" "-e" "remotes::install_local(upgrade = 'always')")
EXECUTE_PROCESS(
COMMAND R "--slave" "--no-save" "-e" "FIMS:::setup_gtest()")

# Enable testing for current directory and below
enable_testing()

Expand Down
2 changes: 1 addition & 1 deletion R/setup_gtest.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ setup_gtest <- function() {
# write json file
outputname <- paste0("C", c_case, "_om_output", i_iter, ".json")
inputname <- paste0("C", c_case, "_om_input", i_iter, ".json")
json_folder <- file.path("tests", "integration", "inputs", "FIMS-deterministic")
json_folder <- file.path("tests", "integration", "FIMS-deterministic-inputs")
if (!dir.exists(json_folder)) dir.create(json_folder)
jsonlite::write_json(
x = om_output, path = file.path(json_folder, outputname),
Expand Down
68 changes: 0 additions & 68 deletions tests/gtest/integration_test_fixture.cpp

This file was deleted.

4 changes: 2 additions & 2 deletions tests/gtest/integration_test_population.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ namespace
ss.str("");
// GoogleTest operates in the folder with executables "build/tests/gtest"
// so we have to go up three directories to get into FIMS folder
ss << "../../../tests/integration/inputs/FIMS-deterministic/C" <<c_case <<"_om_input" << i_iter + 1 << ".json";
ss << "../../../tests/integration/FIMS-deterministic-inputs/C" <<c_case <<"_om_input" << i_iter + 1 << ".json";
t.ReadJson(ss.str(), input_);
ss.str("");

// Read in outputs
ss << "../../../tests/integration/inputs/FIMS-deterministic/C" <<c_case <<"_om_output" << i_iter + 1 << ".json";
ss << "../../../tests/integration/FIMS-deterministic-inputs/C" <<c_case <<"_om_output" << i_iter + 1 << ".json";
t.ReadJson(ss.str(), output_);
input = input_.GetObject();
output = output_.GetObject();
Expand Down
71 changes: 0 additions & 71 deletions tests/integration/inputs/FIMS-deterministic/C0_om_input1.json

This file was deleted.

175 changes: 0 additions & 175 deletions tests/integration/inputs/FIMS-deterministic/C0_om_output1.json

This file was deleted.

71 changes: 0 additions & 71 deletions tests/integration/inputs/FIMS-deterministic/C1_om_input1.json

This file was deleted.

Loading

0 comments on commit e18f15f

Please sign in to comment.