From 7d5d8a4dde19e91c34c9fe3697d412b730f1b124 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Fri, 9 Aug 2024 11:19:34 -0400 Subject: [PATCH 1/3] go.mod: bump minimum go version to 1.16 The tests started using os.WriteFile in e09a001 (init: make compatible with Windows, 2023-02-02), but it isn't available until 1.16. We're due for an update of the minimum Go version, but for now just increase to 1.16. As of Go 1.16, ioutil.{ReadFile,WriteFile,ReadFile} are deprecated and just relay functions in io or os. Use the new functions directly. This issue was flagged by the upcoming lint GitHub Actions that runs with the minimum Go version specified in go.mod. --- cmd/nonmem.go | 5 ++--- cmd/run.go | 3 +-- go.mod | 2 +- integration/bbi_reclean_test.go | 6 +++--- integration/config_test.go | 6 +++--- integration/data_test.go | 6 +++--- integration/files.go | 4 ++-- integration/golden_util.go | 6 +++--- integration/init_test.go | 6 +++--- integration/nmqual_test.go | 4 ++-- integration/nonmem.go | 3 +-- integration/postexecution_test.go | 3 +-- integration/setup.go | 5 ++--- xmlparser/main.go | 3 +-- 14 files changed, 28 insertions(+), 34 deletions(-) diff --git a/cmd/nonmem.go b/cmd/nonmem.go index 1a857f34..8d1ed1ff 100644 --- a/cmd/nonmem.go +++ b/cmd/nonmem.go @@ -18,7 +18,6 @@ import ( "bytes" "errors" "fmt" - "io/ioutil" "os" "path" "path/filepath" @@ -301,12 +300,12 @@ func copyFileToDestination(l *NonMemModel, modifyPath bool) error { } } else { var input []byte - input, err = ioutil.ReadFile(l.Path) + input, err = os.ReadFile(l.Path) if err != nil { return fmt.Errorf("unable to read %s: %w", l.Path, err) } - err = ioutil.WriteFile(path.Join(l.OutputDir, filename), input, stats.Mode()) + err = os.WriteFile(path.Join(l.OutputDir, filename), input, stats.Mode()) if err != nil { return fmt.Errorf("unable to write contents %s: %w", l.Path, err) } diff --git a/cmd/run.go b/cmd/run.go index d857d1f7..70496bbd 100644 --- a/cmd/run.go +++ b/cmd/run.go @@ -3,7 +3,6 @@ package cmd import ( "bytes" "errors" - "io/ioutil" "os" "os/exec" "path/filepath" @@ -281,7 +280,7 @@ func ExecutePostWorkDirectivesWithEnvironment(worker PostWorkExecutor) (string, }).Debug("Writing contents to file in output directory") // TODO: use more secure permission of 0600 or less - err = ioutil.WriteFile(filepath.Join(worker.GetWorkingPath(), "post_processing.sh"), processedBytes, 0755) // nolint:gosec + err = os.WriteFile(filepath.Join(worker.GetWorkingPath(), "post_processing.sh"), processedBytes, 0755) // nolint:gosec if err != nil { return "", err diff --git a/go.mod b/go.mod index f442f3a6..d7054a90 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/metrumresearchgroup/bbi -go 1.15 +go 1.16 require ( github.com/clbanning/mxj v1.8.4 diff --git a/integration/bbi_reclean_test.go b/integration/bbi_reclean_test.go index 05bbb012..c82e601a 100644 --- a/integration/bbi_reclean_test.go +++ b/integration/bbi_reclean_test.go @@ -2,7 +2,7 @@ package bbitest import ( "context" - "io/ioutil" + "os" "path/filepath" "regexp" "testing" @@ -17,9 +17,9 @@ func TestBBIRecleanBasic(tt *testing.T) { fdata := filepath.Join(dir, "FDATA") fdataCSV := filepath.Join(dir, "FDATA.csv") - _ = ioutil.WriteFile(fdata, []byte("fake"), 0644) + _ = os.WriteFile(fdata, []byte("fake"), 0644) t.A.FileExists(fdata) - _ = ioutil.WriteFile(fdataCSV, []byte("fake"), 0644) + _ = os.WriteFile(fdataCSV, []byte("fake"), 0644) t.A.FileExists(fdataCSV) output, err := executeCommand(context.Background(), diff --git a/integration/config_test.go b/integration/config_test.go index 4463981b..eb7fe947 100644 --- a/integration/config_test.go +++ b/integration/config_test.go @@ -3,7 +3,7 @@ package bbitest import ( "context" "encoding/json" - "io/ioutil" + "io" "os" "path/filepath" "testing" @@ -70,7 +70,7 @@ func AssertBBIConfigContainsSpecifiedNMVersion(t *wrapt.T, details NonMemTesting t.Helper() configFile, _ := os.Open(filepath.Join(details.OutputDir, "bbi_config.json")) - cbytes, _ := ioutil.ReadAll(configFile) + cbytes, _ := io.ReadAll(configFile) configFile.Close() // Go ahead and close the file handle nm := cmd.NonMemModel{} @@ -138,7 +138,7 @@ func TestConfigValuesAreCorrectInWrittenFile(tt *testing.T) { configFile := filepath.Join(scenario.Workpath, m.identifier, "bbi.yaml") file, _ := os.Open(configFile) Config := configlib.Config{} - bytes, _ := ioutil.ReadAll(file) + bytes, _ := io.ReadAll(file) err = yaml.Unmarshal(bytes, &Config) t.A.Nil(err) diff --git a/integration/data_test.go b/integration/data_test.go index e6aa724d..1f9a566a 100644 --- a/integration/data_test.go +++ b/integration/data_test.go @@ -3,7 +3,7 @@ package bbitest import ( "context" "fmt" - "io/ioutil" + "io" "os" "path/filepath" "strings" @@ -62,7 +62,7 @@ func TestHasInvalidDataPath(tt *testing.T) { t.Run(utils.AddTestId(m.identifier, testId), func(t *wrapt.T) { // We need to manipulate the file to contain an invalid file reference file, _ := os.Open(filepath.Join(scenario.Workpath, m.filename)) - b, _ := ioutil.ReadAll(file) + b, _ := io.ReadAll(file) file.Close() // Explicitly close so we can write it again lines := strings.Split(string(b), "\n") @@ -75,7 +75,7 @@ func TestHasInvalidDataPath(tt *testing.T) { adjusted := strings.Join(lines, "\n") ab := []byte(adjusted) - err := ioutil.WriteFile(filepath.Join(scenario.Workpath, m.filename), ab, 0755) + err := os.WriteFile(filepath.Join(scenario.Workpath, m.filename), ab, 0755) if err != nil { t.Log("Had a problem writing the file") diff --git a/integration/files.go b/integration/files.go index 2f6a6323..12e5150f 100644 --- a/integration/files.go +++ b/integration/files.go @@ -1,7 +1,7 @@ package bbitest import ( - "io/ioutil" + "io" "os" "strings" ) @@ -15,7 +15,7 @@ func fileLines(path string) ([]string, error) { defer file.Close() - contentBytes, err := ioutil.ReadAll(file) + contentBytes, err := io.ReadAll(file) if err != nil { return []string{}, err diff --git a/integration/golden_util.go b/integration/golden_util.go index 75613134..f5340c98 100644 --- a/integration/golden_util.go +++ b/integration/golden_util.go @@ -2,7 +2,7 @@ package bbitest import ( "fmt" - "io/ioutil" + "os" "github.com/metrumresearchgroup/wrapt" ) @@ -16,7 +16,7 @@ type GoldenFileTestingDetails struct { func RequireOutputMatchesGoldenFile(t *wrapt.T, details GoldenFileTestingDetails) { t.Helper() - gb, err := ioutil.ReadFile(details.goldenFilePath) + gb, err := os.ReadFile(details.goldenFilePath) if err != nil { err = fmt.Errorf("failed reading %s: %w", details.goldenFilePath, err) } @@ -35,7 +35,7 @@ func UpdateGoldenFile(t *wrapt.T, details GoldenFileTestingDetails) { t.Logf("updating golden file %s", details.goldenFilePath) - err := ioutil.WriteFile(details.goldenFilePath, []byte(details.outputString), 0644) + err := os.WriteFile(details.goldenFilePath, []byte(details.outputString), 0644) if err != nil { err = fmt.Errorf("failed to update %s: %w", details.goldenFilePath, err) } diff --git a/integration/init_test.go b/integration/init_test.go index d05ace6d..e1d3c7c1 100644 --- a/integration/init_test.go +++ b/integration/init_test.go @@ -3,7 +3,7 @@ package bbitest import ( "context" "fmt" - "io/ioutil" + "io" "os" "os/exec" "path/filepath" @@ -46,7 +46,7 @@ func TestInitialization(tt *testing.T) { t.R.NoError(err) defer func() { t.R.NoError(configHandle.Close()) }() - bytes, err := ioutil.ReadAll(configHandle) + bytes, err := io.ReadAll(configHandle) t.R.NoError(err) t.R.NotContains(bytes, []byte("bbi_binary")) @@ -95,7 +95,7 @@ func TestInitializationSanitization(tt *testing.T) { t.R.NoError(err) defer fh.Close() - bytes, err := ioutil.ReadAll(fh) + bytes, err := io.ReadAll(fh) t.R.NoError(err) t.R.NoError(yaml.Unmarshal(bytes, &c)) t.R.Equal(c.Nonmem["x-y"].Home, filepath.Join(tdir, "x.y")) diff --git a/integration/nmqual_test.go b/integration/nmqual_test.go index 0febc80c..39668a50 100644 --- a/integration/nmqual_test.go +++ b/integration/nmqual_test.go @@ -2,7 +2,7 @@ package bbitest import ( "context" - "io/ioutil" + "io" "os" "path/filepath" "testing" @@ -103,7 +103,7 @@ func AssertScriptContainsAutologReference(t *wrapt.T, details NonMemTestingDetai t.Helper() scriptFile, _ := os.Open(filepath.Join(details.OutputDir, details.Model.identifier+".sh")) - bytes, _ := ioutil.ReadAll(scriptFile) + bytes, _ := io.ReadAll(scriptFile) err := scriptFile.Close() t.R.NoError(err) diff --git a/integration/nonmem.go b/integration/nonmem.go index cd9b8cb3..e7848429 100644 --- a/integration/nonmem.go +++ b/integration/nonmem.go @@ -4,7 +4,6 @@ import ( "crypto/md5" "fmt" "io" - "io/ioutil" "os" "path/filepath" "strings" @@ -119,7 +118,7 @@ func AssertSpecifiedConfigLoaded(t *wrapt.T, details NonMemTestingDetails, speci func AssertContainsNMFEOptions(t *wrapt.T, filepath string, optionValue string) { t.Helper() - content, _ := ioutil.ReadFile(filepath) + content, _ := os.ReadFile(filepath) contentString := string(content) t.R.Contains(contentString, optionValue) } diff --git a/integration/postexecution_test.go b/integration/postexecution_test.go index bdbfd764..b80d39e3 100644 --- a/integration/postexecution_test.go +++ b/integration/postexecution_test.go @@ -4,7 +4,6 @@ import ( "bufio" "bytes" "context" - "io/ioutil" "os" "path/filepath" "strings" @@ -86,7 +85,7 @@ func TestPostExecutionSucceeds(tt *testing.T) { scenarios = append(scenarios, scenario) } - err = ioutil.WriteFile(filepath.Join(ROOT_EXECUTION_DIR, "post.sh"), []byte(postExecutionScriptString), 0755) + err = os.WriteFile(filepath.Join(ROOT_EXECUTION_DIR, "post.sh"), []byte(postExecutionScriptString), 0755) t.R.NoError(err) }) }() diff --git a/integration/setup.go b/integration/setup.go index 47e0da79..7bc31b2c 100644 --- a/integration/setup.go +++ b/integration/setup.go @@ -8,7 +8,6 @@ import ( "errors" "fmt" "io" - "io/ioutil" "os" "path/filepath" "strconv" @@ -481,7 +480,7 @@ func FeatureEnabled(key string) bool { func GetScenarioDetailsFromFile(r io.Reader) (ScenarioDetails, error) { var s ScenarioDetails - contents, _ := ioutil.ReadAll(r) + contents, _ := io.ReadAll(r) err := json.Unmarshal(contents, &s) return s, err @@ -489,7 +488,7 @@ func GetScenarioDetailsFromFile(r io.Reader) (ScenarioDetails, error) { func GetBBIConfigJSONHashedValues(r io.Reader) (Hashes, error) { var h Hashes - contents, _ := ioutil.ReadAll(r) + contents, _ := io.ReadAll(r) err := json.Unmarshal(contents, &h) return h, err diff --git a/xmlparser/main.go b/xmlparser/main.go index 29241401..be5c1944 100644 --- a/xmlparser/main.go +++ b/xmlparser/main.go @@ -2,7 +2,6 @@ package main import ( "fmt" - "io/ioutil" "bytes" @@ -19,7 +18,7 @@ func main() { if os.IsNotExist(err) { fmt.Println("could not find specified file or resolve path") } - xmlDataRaw, err := ioutil.ReadFile(file) + xmlDataRaw, err := os.ReadFile(file) if err != nil { fmt.Println("error reading") fmt.Println(err) From e8e2124d549725dc9c36a58a6c27aa9ac82c4bb2 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Fri, 9 Aug 2024 11:19:35 -0400 Subject: [PATCH 2/3] integration: split tests into nonmem and postrun subdirectories A subset of the integration tests don't require NONMEM. It's convenient to put them so that they can be more easily executed on machines that don't have NONMEM. The upcoming GitHub Actions workflow will execute the integration/postrun tests. --- integration/execute.go | 6 +++--- integration/nonmem/README.md | 1 + integration/{ => nonmem}/bbi_expansion_test.go | 9 +++++---- integration/{ => nonmem}/bbi_local_test.go | 5 +++-- integration/{ => nonmem}/bbi_sge_test.go | 2 +- integration/{ => nonmem}/config_test.go | 2 +- integration/{ => nonmem}/data_test.go | 2 +- integration/{ => nonmem}/files.go | 2 +- integration/{ => nonmem}/init_test.go | 5 +++-- integration/{ => nonmem}/nmqual_test.go | 2 +- integration/{ => nonmem}/nonmem.go | 2 +- integration/{ => nonmem}/postexecution_test.go | 2 +- integration/{ => nonmem}/setup.go | 17 ++++++----------- integration/{ => nonmem}/testdata/.gitignore | 0 .../{ => nonmem}/testdata/acop/.gitignore | 0 .../{ => nonmem}/testdata/acop/acop.csv | 0 .../{ => nonmem}/testdata/acop/acop.mod | 0 .../{ => nonmem}/testdata/acop/acoptar.gz | Bin .../{ => nonmem}/testdata/acop/scenario.json | 0 .../bbi_expansion/data/derived/acop.csv | 0 .../testdata/bbi_expansion/model/101.ctl | 0 .../testdata/bbi_expansion/model/102.ctl | 0 .../testdata/bbi_expansion/model/103.ctl | 0 .../testdata/bbi_expansion/model/104.ctl | 0 .../testdata/bbi_expansion/model/105.ctl | 0 .../bbi_expansion/model/bbi_mainrun_101.ctl | 0 .../bbi_expansion/model/bbi_mainrun_102.ctl | 0 .../bbi_expansion/model/bbi_mainrun_103.ctl | 0 .../testdata/bbi_expansion/scenario.json | 0 .../{ => nonmem}/testdata/ctl_test/acop.csv | 0 .../{ => nonmem}/testdata/ctl_test/acop.ctl | 0 .../testdata/ctl_test/scenario.json | 0 .../{ => nonmem}/testdata/datacomment/acop.csv | 0 .../{ => nonmem}/testdata/datacomment/acop.ctl | 0 .../testdata/datacomment/scenario.json | 0 .../testdata/leading-path-with space/acop.csv | 0 .../testdata/leading-path-with space/acop.ctl | 0 .../leading-path-with space/scenario.json | 0 .../testdata/metrum_std/data/derived/Data.csv | 0 .../model/nonmem/test_suite_1/acop.ctl | 0 .../model/nonmem/test_suite_1/acop2.mod | 0 .../testdata/metrum_std/scenario.json | 0 .../{ => nonmem}/testdata/modquote/acop.csv | 0 .../{ => nonmem}/testdata/modquote/m'd.ctl | 0 .../testdata/modquote/scenario.json | 0 .../testdata/period_test/acop.1.ctl | 0 .../{ => nonmem}/testdata/period_test/acop.csv | 0 .../testdata/period_test/scenario.json | 0 integration/{ => postrun}/README.md | 4 ++-- integration/{ => postrun}/bbi_covcor_test.go | 7 ++++--- integration/{ => postrun}/bbi_params_test.go | 7 ++++--- integration/{ => postrun}/bbi_reclean_test.go | 7 ++++--- integration/{ => postrun}/bbi_summary_test.go | 17 +++++++++-------- integration/{ => postrun}/golden_util.go | 2 +- integration/postrun/setup.go | 8 ++++++++ .../testdata/bbi_summary/1001.ctl | 0 .../testdata/bbi_summary/1001/.gitignore | 0 .../testdata/bbi_summary/1001/1001.1.TXT | 0 .../testdata/bbi_summary/1001/1001.cor | 0 .../testdata/bbi_summary/1001/1001.cov | 0 .../testdata/bbi_summary/1001/1001.cpu | 0 .../testdata/bbi_summary/1001/1001.ctl | 0 .../testdata/bbi_summary/1001/1001.ext | 0 .../testdata/bbi_summary/1001/1001.lst | 0 .../testdata/bbi_summary/1001/PRDERR | 0 .../12-empty-problem/12-empty-problem.ext | 0 .../12-empty-problem/12-empty-problem.grd | 0 .../12-empty-problem/12-empty-problem.lst | 0 .../12-empty-problem/12-empty-problem.shk | 0 .../12-invalid-lst/12-invalid-lst.cpu | 0 .../12-invalid-lst/12-invalid-lst.ctl | 0 .../12-invalid-lst/12-invalid-lst.ext | 0 .../12-invalid-lst/12-invalid-lst.grd | 0 .../12-invalid-lst/12-invalid-lst.lst | 0 .../12-invalid-lst/12-invalid-lst.shk | 0 .../{ => postrun}/testdata/bbi_summary/12.ctl | 0 .../testdata/bbi_summary/12/.gitignore | 0 .../testdata/bbi_summary/12/12.cpu | 0 .../testdata/bbi_summary/12/12.ctl | 0 .../testdata/bbi_summary/12/12.ext | 0 .../testdata/bbi_summary/12/12.grd | 0 .../testdata/bbi_summary/12/12.lst | 0 .../testdata/bbi_summary/12/12.shk | 0 .../{ => postrun}/testdata/bbi_summary/66.ctl | 0 .../testdata/bbi_summary/66/.gitignore | 0 .../testdata/bbi_summary/66/66.cpu | 0 .../testdata/bbi_summary/66/66.ctl | 0 .../testdata/bbi_summary/66/66.ext | 0 .../testdata/bbi_summary/66/66.grd | 0 .../testdata/bbi_summary/66/66.lst | 0 .../testdata/bbi_summary/66/PRDERR | 0 .../aa_golden_files/1001.golden.covcor.json | 0 .../aa_golden_files/1001.golden.json | 0 .../aa_golden_files/1001.golden.txt | 0 .../12-empty-problem.golden.json | 0 .../12-empty-problem.golden.txt | 0 .../bbi_summary/aa_golden_files/12.golden.json | 0 .../bbi_summary/aa_golden_files/12.golden.txt | 0 .../bbi_summary/aa_golden_files/66.golden.json | 0 .../bbi_summary/aa_golden_files/66.golden.txt | 0 .../aa_golden_files/acop-iov.golden.json | 0 .../aa_golden_files/acop-iov.golden.txt | 0 .../aa_golden_files/acop-nan.golden.json | 0 .../aa_golden_files/acop-nan.golden.txt | 0 .../aa_golden_files/acop.golden.covcor.json | 0 .../aa_golden_files/acop.golden.json | 0 .../aa_golden_files/acop.golden.txt | 0 .../aa_golden_files/acop_no_grd.golden.json | 0 .../aa_golden_files/acop_no_grd.golden.txt | 0 .../aa_golden_files/chain.golden.json | 0 .../aa_golden_files/chain.golden.txt | 0 .../dir_bbi_summary.golden.params.csv | 0 .../dir_bbi_summary.golden.params.json | 0 .../aa_golden_files/example2_bayes.golden.json | 0 .../example2_bayes.golden.params.csv | 0 .../example2_bayes.golden.params.json | 0 .../aa_golden_files/example2_bayes.golden.txt | 0 .../example2_itsimp.golden.covcor.json | 0 .../example2_itsimp.golden.json | 0 .../aa_golden_files/example2_itsimp.golden.txt | 0 .../example2_saemimp.golden.json | 0 .../example2_saemimp.golden.txt | 0 .../aa_golden_files/iovmm.golden.json | 0 .../aa_golden_files/iovmm.golden.txt | 0 .../multiple-models-error.golden.json | 0 .../multiple-models.golden.json | 0 .../aa_golden_files/multiple-models.golden.txt | 0 .../aa_golden_files/onlysim.golden.json | 0 .../aa_golden_files/onlysim.golden.txt | 0 .../acop-incomplete/acop-incomplete.cor | 0 .../acop-incomplete/acop-incomplete.cov | 0 .../acop-incomplete/acop-incomplete.cpu | 0 .../acop-incomplete/acop-incomplete.ext | 0 .../acop-incomplete/acop-incomplete.grd | 0 .../acop-incomplete/acop-incomplete.lst | 0 .../acop-incomplete/acop-incomplete.shk | 0 .../testdata/bbi_summary/acop-iov.mod | 0 .../testdata/bbi_summary/acop-iov/acop-iov.cpu | 0 .../testdata/bbi_summary/acop-iov/acop-iov.ext | 0 .../testdata/bbi_summary/acop-iov/acop-iov.grd | 0 .../testdata/bbi_summary/acop-iov/acop-iov.lst | 0 .../testdata/bbi_summary/acop-iov/acop-iov.mod | 0 .../testdata/bbi_summary/acop-iov/acop-iov.shk | 0 .../testdata/bbi_summary/acop-nan/acop-nan.cor | 0 .../testdata/bbi_summary/acop-nan/acop-nan.cov | 0 .../testdata/bbi_summary/acop-nan/acop-nan.cpu | 0 .../testdata/bbi_summary/acop-nan/acop-nan.ext | 0 .../testdata/bbi_summary/acop-nan/acop-nan.grd | 0 .../testdata/bbi_summary/acop-nan/acop-nan.lst | 0 .../testdata/bbi_summary/acop-nan/acop-nan.shk | 0 .../testdata/bbi_summary/acop.ctl | 0 .../testdata/bbi_summary/acop/acop.cor | 0 .../testdata/bbi_summary/acop/acop.cov | 0 .../testdata/bbi_summary/acop/acop.cpu | 0 .../testdata/bbi_summary/acop/acop.ext | 0 .../testdata/bbi_summary/acop/acop.grd | 0 .../testdata/bbi_summary/acop/acop.lst | 0 .../testdata/bbi_summary/acop/acop.shk | 0 .../bbi_summary/acop_no_grd/acop_no_grd.cpu | 0 .../bbi_summary/acop_no_grd/acop_no_grd.ext | 0 .../bbi_summary/acop_no_grd/acop_no_grd.lst | 0 .../bbi_summary/acop_no_grd/acop_no_grd.shk | 0 .../testdata/bbi_summary/chain/chain.ext | 0 .../testdata/bbi_summary/chain/chain.lst | 0 .../testdata/bbi_summary/example2_bayes.ctl | 0 .../bbi_summary/example2_bayes/.gitignore | 0 .../example2_bayes/example2_bayes.cor | 0 .../example2_bayes/example2_bayes.cov | 0 .../example2_bayes/example2_bayes.cpu | 0 .../example2_bayes/example2_bayes.ctl | 0 .../example2_bayes/example2_bayes.ext | 0 .../example2_bayes/example2_bayes.lst | 0 .../example2_bayes/example2_bayes.shk | 0 .../testdata/bbi_summary/example2_itsimp.ctl | 0 .../bbi_summary/example2_itsimp/.gitignore | 0 .../example2_itsimp/example2_itsimp.cor | 0 .../example2_itsimp/example2_itsimp.cov | 0 .../example2_itsimp/example2_itsimp.cpu | 0 .../example2_itsimp/example2_itsimp.ctl | 0 .../example2_itsimp/example2_itsimp.ext | 0 .../example2_itsimp/example2_itsimp.lst | 0 .../example2_itsimp/example2_itsimp.shk | 0 .../testdata/bbi_summary/example2_saemimp.ctl | 0 .../bbi_summary/example2_saemimp/.gitignore | 0 .../example2_saemimp/example2_saemimp.cor | 0 .../example2_saemimp/example2_saemimp.cov | 0 .../example2_saemimp/example2_saemimp.cpu | 0 .../example2_saemimp/example2_saemimp.ctl | 0 .../example2_saemimp/example2_saemimp.ext | 0 .../example2_saemimp/example2_saemimp.lst | 0 .../example2_saemimp/example2_saemimp.shk | 0 .../bbi_summary/example2_saemimp/saem.ext | 0 .../testdata/bbi_summary/iovmm.mod | 0 .../testdata/bbi_summary/iovmm/.gitignore | 0 .../testdata/bbi_summary/iovmm/iovmm.cpu | 0 .../testdata/bbi_summary/iovmm/iovmm.ext | 0 .../testdata/bbi_summary/iovmm/iovmm.grd | 0 .../testdata/bbi_summary/iovmm/iovmm.lst | 0 .../testdata/bbi_summary/iovmm/iovmm.mod | 0 .../testdata/bbi_summary/iovmm/iovmm.shk | 0 .../testdata/bbi_summary/onlysim/onlysim.lst | 0 201 files changed, 60 insertions(+), 49 deletions(-) create mode 100644 integration/nonmem/README.md rename integration/{ => nonmem}/bbi_expansion_test.go (96%) rename integration/{ => nonmem}/bbi_local_test.go (98%) rename integration/{ => nonmem}/bbi_sge_test.go (99%) rename integration/{ => nonmem}/config_test.go (99%) rename integration/{ => nonmem}/data_test.go (99%) rename integration/{ => nonmem}/files.go (95%) rename integration/{ => nonmem}/init_test.go (94%) rename integration/{ => nonmem}/nmqual_test.go (99%) rename integration/{ => nonmem}/nonmem.go (99%) rename integration/{ => nonmem}/postexecution_test.go (99%) rename integration/{ => nonmem}/setup.go (95%) rename integration/{ => nonmem}/testdata/.gitignore (100%) rename integration/{ => nonmem}/testdata/acop/.gitignore (100%) rename integration/{ => nonmem}/testdata/acop/acop.csv (100%) rename integration/{ => nonmem}/testdata/acop/acop.mod (100%) rename integration/{ => nonmem}/testdata/acop/acoptar.gz (100%) rename integration/{ => nonmem}/testdata/acop/scenario.json (100%) rename integration/{ => nonmem}/testdata/bbi_expansion/data/derived/acop.csv (100%) rename integration/{ => nonmem}/testdata/bbi_expansion/model/101.ctl (100%) rename integration/{ => nonmem}/testdata/bbi_expansion/model/102.ctl (100%) rename integration/{ => nonmem}/testdata/bbi_expansion/model/103.ctl (100%) rename integration/{ => nonmem}/testdata/bbi_expansion/model/104.ctl (100%) rename integration/{ => nonmem}/testdata/bbi_expansion/model/105.ctl (100%) rename integration/{ => nonmem}/testdata/bbi_expansion/model/bbi_mainrun_101.ctl (100%) rename integration/{ => nonmem}/testdata/bbi_expansion/model/bbi_mainrun_102.ctl (100%) rename integration/{ => nonmem}/testdata/bbi_expansion/model/bbi_mainrun_103.ctl (100%) rename integration/{ => nonmem}/testdata/bbi_expansion/scenario.json (100%) rename integration/{ => nonmem}/testdata/ctl_test/acop.csv (100%) rename integration/{ => nonmem}/testdata/ctl_test/acop.ctl (100%) rename integration/{ => nonmem}/testdata/ctl_test/scenario.json (100%) rename integration/{ => nonmem}/testdata/datacomment/acop.csv (100%) rename integration/{ => nonmem}/testdata/datacomment/acop.ctl (100%) rename integration/{ => nonmem}/testdata/datacomment/scenario.json (100%) rename integration/{ => nonmem}/testdata/leading-path-with space/acop.csv (100%) rename integration/{ => nonmem}/testdata/leading-path-with space/acop.ctl (100%) rename integration/{ => nonmem}/testdata/leading-path-with space/scenario.json (100%) rename integration/{ => nonmem}/testdata/metrum_std/data/derived/Data.csv (100%) rename integration/{ => nonmem}/testdata/metrum_std/model/nonmem/test_suite_1/acop.ctl (100%) rename integration/{ => nonmem}/testdata/metrum_std/model/nonmem/test_suite_1/acop2.mod (100%) rename integration/{ => nonmem}/testdata/metrum_std/scenario.json (100%) rename integration/{ => nonmem}/testdata/modquote/acop.csv (100%) rename integration/{ => nonmem}/testdata/modquote/m'd.ctl (100%) rename integration/{ => nonmem}/testdata/modquote/scenario.json (100%) rename integration/{ => nonmem}/testdata/period_test/acop.1.ctl (100%) rename integration/{ => nonmem}/testdata/period_test/acop.csv (100%) rename integration/{ => nonmem}/testdata/period_test/scenario.json (100%) rename integration/{ => postrun}/README.md (70%) rename integration/{ => postrun}/bbi_covcor_test.go (88%) rename integration/{ => postrun}/bbi_params_test.go (90%) rename integration/{ => postrun}/bbi_reclean_test.go (82%) rename integration/{ => postrun}/bbi_summary_test.go (94%) rename integration/{ => postrun}/golden_util.go (98%) create mode 100644 integration/postrun/setup.go rename integration/{ => postrun}/testdata/bbi_summary/1001.ctl (100%) rename integration/{ => postrun}/testdata/bbi_summary/1001/.gitignore (100%) rename integration/{ => postrun}/testdata/bbi_summary/1001/1001.1.TXT (100%) rename integration/{ => postrun}/testdata/bbi_summary/1001/1001.cor (100%) rename integration/{ => postrun}/testdata/bbi_summary/1001/1001.cov (100%) rename integration/{ => postrun}/testdata/bbi_summary/1001/1001.cpu (100%) rename integration/{ => postrun}/testdata/bbi_summary/1001/1001.ctl (100%) rename integration/{ => postrun}/testdata/bbi_summary/1001/1001.ext (100%) rename integration/{ => postrun}/testdata/bbi_summary/1001/1001.lst (100%) rename integration/{ => postrun}/testdata/bbi_summary/1001/PRDERR (100%) rename integration/{ => postrun}/testdata/bbi_summary/12-empty-problem/12-empty-problem.ext (100%) rename integration/{ => postrun}/testdata/bbi_summary/12-empty-problem/12-empty-problem.grd (100%) rename integration/{ => postrun}/testdata/bbi_summary/12-empty-problem/12-empty-problem.lst (100%) rename integration/{ => postrun}/testdata/bbi_summary/12-empty-problem/12-empty-problem.shk (100%) rename integration/{ => postrun}/testdata/bbi_summary/12-invalid-lst/12-invalid-lst.cpu (100%) rename integration/{ => postrun}/testdata/bbi_summary/12-invalid-lst/12-invalid-lst.ctl (100%) rename integration/{ => postrun}/testdata/bbi_summary/12-invalid-lst/12-invalid-lst.ext (100%) rename integration/{ => postrun}/testdata/bbi_summary/12-invalid-lst/12-invalid-lst.grd (100%) rename integration/{ => postrun}/testdata/bbi_summary/12-invalid-lst/12-invalid-lst.lst (100%) rename integration/{ => postrun}/testdata/bbi_summary/12-invalid-lst/12-invalid-lst.shk (100%) rename integration/{ => postrun}/testdata/bbi_summary/12.ctl (100%) rename integration/{ => postrun}/testdata/bbi_summary/12/.gitignore (100%) rename integration/{ => postrun}/testdata/bbi_summary/12/12.cpu (100%) rename integration/{ => postrun}/testdata/bbi_summary/12/12.ctl (100%) rename integration/{ => postrun}/testdata/bbi_summary/12/12.ext (100%) rename integration/{ => postrun}/testdata/bbi_summary/12/12.grd (100%) rename integration/{ => postrun}/testdata/bbi_summary/12/12.lst (100%) rename integration/{ => postrun}/testdata/bbi_summary/12/12.shk (100%) rename integration/{ => postrun}/testdata/bbi_summary/66.ctl (100%) rename integration/{ => postrun}/testdata/bbi_summary/66/.gitignore (100%) rename integration/{ => postrun}/testdata/bbi_summary/66/66.cpu (100%) rename integration/{ => postrun}/testdata/bbi_summary/66/66.ctl (100%) rename integration/{ => postrun}/testdata/bbi_summary/66/66.ext (100%) rename integration/{ => postrun}/testdata/bbi_summary/66/66.grd (100%) rename integration/{ => postrun}/testdata/bbi_summary/66/66.lst (100%) rename integration/{ => postrun}/testdata/bbi_summary/66/PRDERR (100%) rename integration/{ => postrun}/testdata/bbi_summary/aa_golden_files/1001.golden.covcor.json (100%) rename integration/{ => postrun}/testdata/bbi_summary/aa_golden_files/1001.golden.json (100%) rename integration/{ => postrun}/testdata/bbi_summary/aa_golden_files/1001.golden.txt (100%) rename integration/{ => postrun}/testdata/bbi_summary/aa_golden_files/12-empty-problem.golden.json (100%) rename integration/{ => postrun}/testdata/bbi_summary/aa_golden_files/12-empty-problem.golden.txt (100%) rename integration/{ => postrun}/testdata/bbi_summary/aa_golden_files/12.golden.json (100%) rename integration/{ => postrun}/testdata/bbi_summary/aa_golden_files/12.golden.txt (100%) rename integration/{ => postrun}/testdata/bbi_summary/aa_golden_files/66.golden.json (100%) rename integration/{ => postrun}/testdata/bbi_summary/aa_golden_files/66.golden.txt (100%) rename integration/{ => postrun}/testdata/bbi_summary/aa_golden_files/acop-iov.golden.json (100%) rename integration/{ => postrun}/testdata/bbi_summary/aa_golden_files/acop-iov.golden.txt (100%) rename integration/{ => postrun}/testdata/bbi_summary/aa_golden_files/acop-nan.golden.json (100%) rename integration/{ => postrun}/testdata/bbi_summary/aa_golden_files/acop-nan.golden.txt (100%) rename integration/{ => postrun}/testdata/bbi_summary/aa_golden_files/acop.golden.covcor.json (100%) rename integration/{ => postrun}/testdata/bbi_summary/aa_golden_files/acop.golden.json (100%) rename integration/{ => postrun}/testdata/bbi_summary/aa_golden_files/acop.golden.txt (100%) rename integration/{ => postrun}/testdata/bbi_summary/aa_golden_files/acop_no_grd.golden.json (100%) rename integration/{ => postrun}/testdata/bbi_summary/aa_golden_files/acop_no_grd.golden.txt (100%) rename integration/{ => postrun}/testdata/bbi_summary/aa_golden_files/chain.golden.json (100%) rename integration/{ => postrun}/testdata/bbi_summary/aa_golden_files/chain.golden.txt (100%) rename integration/{ => postrun}/testdata/bbi_summary/aa_golden_files/dir_bbi_summary.golden.params.csv (100%) rename integration/{ => postrun}/testdata/bbi_summary/aa_golden_files/dir_bbi_summary.golden.params.json (100%) rename integration/{ => postrun}/testdata/bbi_summary/aa_golden_files/example2_bayes.golden.json (100%) rename integration/{ => postrun}/testdata/bbi_summary/aa_golden_files/example2_bayes.golden.params.csv (100%) rename integration/{ => postrun}/testdata/bbi_summary/aa_golden_files/example2_bayes.golden.params.json (100%) rename integration/{ => postrun}/testdata/bbi_summary/aa_golden_files/example2_bayes.golden.txt (100%) rename integration/{ => postrun}/testdata/bbi_summary/aa_golden_files/example2_itsimp.golden.covcor.json (100%) rename integration/{ => postrun}/testdata/bbi_summary/aa_golden_files/example2_itsimp.golden.json (100%) rename integration/{ => postrun}/testdata/bbi_summary/aa_golden_files/example2_itsimp.golden.txt (100%) rename integration/{ => postrun}/testdata/bbi_summary/aa_golden_files/example2_saemimp.golden.json (100%) rename integration/{ => postrun}/testdata/bbi_summary/aa_golden_files/example2_saemimp.golden.txt (100%) rename integration/{ => postrun}/testdata/bbi_summary/aa_golden_files/iovmm.golden.json (100%) rename integration/{ => postrun}/testdata/bbi_summary/aa_golden_files/iovmm.golden.txt (100%) rename integration/{ => postrun}/testdata/bbi_summary/aa_golden_files/multiple-models-error.golden.json (100%) rename integration/{ => postrun}/testdata/bbi_summary/aa_golden_files/multiple-models.golden.json (100%) rename integration/{ => postrun}/testdata/bbi_summary/aa_golden_files/multiple-models.golden.txt (100%) rename integration/{ => postrun}/testdata/bbi_summary/aa_golden_files/onlysim.golden.json (100%) rename integration/{ => postrun}/testdata/bbi_summary/aa_golden_files/onlysim.golden.txt (100%) rename integration/{ => postrun}/testdata/bbi_summary/acop-incomplete/acop-incomplete.cor (100%) rename integration/{ => postrun}/testdata/bbi_summary/acop-incomplete/acop-incomplete.cov (100%) rename integration/{ => postrun}/testdata/bbi_summary/acop-incomplete/acop-incomplete.cpu (100%) rename integration/{ => postrun}/testdata/bbi_summary/acop-incomplete/acop-incomplete.ext (100%) rename integration/{ => postrun}/testdata/bbi_summary/acop-incomplete/acop-incomplete.grd (100%) rename integration/{ => postrun}/testdata/bbi_summary/acop-incomplete/acop-incomplete.lst (100%) rename integration/{ => postrun}/testdata/bbi_summary/acop-incomplete/acop-incomplete.shk (100%) rename integration/{ => postrun}/testdata/bbi_summary/acop-iov.mod (100%) rename integration/{ => postrun}/testdata/bbi_summary/acop-iov/acop-iov.cpu (100%) rename integration/{ => postrun}/testdata/bbi_summary/acop-iov/acop-iov.ext (100%) rename integration/{ => postrun}/testdata/bbi_summary/acop-iov/acop-iov.grd (100%) rename integration/{ => postrun}/testdata/bbi_summary/acop-iov/acop-iov.lst (100%) rename integration/{ => postrun}/testdata/bbi_summary/acop-iov/acop-iov.mod (100%) rename integration/{ => postrun}/testdata/bbi_summary/acop-iov/acop-iov.shk (100%) rename integration/{ => postrun}/testdata/bbi_summary/acop-nan/acop-nan.cor (100%) rename integration/{ => postrun}/testdata/bbi_summary/acop-nan/acop-nan.cov (100%) rename integration/{ => postrun}/testdata/bbi_summary/acop-nan/acop-nan.cpu (100%) rename integration/{ => postrun}/testdata/bbi_summary/acop-nan/acop-nan.ext (100%) rename integration/{ => postrun}/testdata/bbi_summary/acop-nan/acop-nan.grd (100%) rename integration/{ => postrun}/testdata/bbi_summary/acop-nan/acop-nan.lst (100%) rename integration/{ => postrun}/testdata/bbi_summary/acop-nan/acop-nan.shk (100%) rename integration/{ => postrun}/testdata/bbi_summary/acop.ctl (100%) rename integration/{ => postrun}/testdata/bbi_summary/acop/acop.cor (100%) rename integration/{ => postrun}/testdata/bbi_summary/acop/acop.cov (100%) rename integration/{ => postrun}/testdata/bbi_summary/acop/acop.cpu (100%) rename integration/{ => postrun}/testdata/bbi_summary/acop/acop.ext (100%) rename integration/{ => postrun}/testdata/bbi_summary/acop/acop.grd (100%) rename integration/{ => postrun}/testdata/bbi_summary/acop/acop.lst (100%) rename integration/{ => postrun}/testdata/bbi_summary/acop/acop.shk (100%) rename integration/{ => postrun}/testdata/bbi_summary/acop_no_grd/acop_no_grd.cpu (100%) rename integration/{ => postrun}/testdata/bbi_summary/acop_no_grd/acop_no_grd.ext (100%) rename integration/{ => postrun}/testdata/bbi_summary/acop_no_grd/acop_no_grd.lst (100%) rename integration/{ => postrun}/testdata/bbi_summary/acop_no_grd/acop_no_grd.shk (100%) rename integration/{ => postrun}/testdata/bbi_summary/chain/chain.ext (100%) rename integration/{ => postrun}/testdata/bbi_summary/chain/chain.lst (100%) rename integration/{ => postrun}/testdata/bbi_summary/example2_bayes.ctl (100%) rename integration/{ => postrun}/testdata/bbi_summary/example2_bayes/.gitignore (100%) rename integration/{ => postrun}/testdata/bbi_summary/example2_bayes/example2_bayes.cor (100%) rename integration/{ => postrun}/testdata/bbi_summary/example2_bayes/example2_bayes.cov (100%) rename integration/{ => postrun}/testdata/bbi_summary/example2_bayes/example2_bayes.cpu (100%) rename integration/{ => postrun}/testdata/bbi_summary/example2_bayes/example2_bayes.ctl (100%) rename integration/{ => postrun}/testdata/bbi_summary/example2_bayes/example2_bayes.ext (100%) rename integration/{ => postrun}/testdata/bbi_summary/example2_bayes/example2_bayes.lst (100%) rename integration/{ => postrun}/testdata/bbi_summary/example2_bayes/example2_bayes.shk (100%) rename integration/{ => postrun}/testdata/bbi_summary/example2_itsimp.ctl (100%) rename integration/{ => postrun}/testdata/bbi_summary/example2_itsimp/.gitignore (100%) rename integration/{ => postrun}/testdata/bbi_summary/example2_itsimp/example2_itsimp.cor (100%) rename integration/{ => postrun}/testdata/bbi_summary/example2_itsimp/example2_itsimp.cov (100%) rename integration/{ => postrun}/testdata/bbi_summary/example2_itsimp/example2_itsimp.cpu (100%) rename integration/{ => postrun}/testdata/bbi_summary/example2_itsimp/example2_itsimp.ctl (100%) rename integration/{ => postrun}/testdata/bbi_summary/example2_itsimp/example2_itsimp.ext (100%) rename integration/{ => postrun}/testdata/bbi_summary/example2_itsimp/example2_itsimp.lst (100%) rename integration/{ => postrun}/testdata/bbi_summary/example2_itsimp/example2_itsimp.shk (100%) rename integration/{ => postrun}/testdata/bbi_summary/example2_saemimp.ctl (100%) rename integration/{ => postrun}/testdata/bbi_summary/example2_saemimp/.gitignore (100%) rename integration/{ => postrun}/testdata/bbi_summary/example2_saemimp/example2_saemimp.cor (100%) rename integration/{ => postrun}/testdata/bbi_summary/example2_saemimp/example2_saemimp.cov (100%) rename integration/{ => postrun}/testdata/bbi_summary/example2_saemimp/example2_saemimp.cpu (100%) rename integration/{ => postrun}/testdata/bbi_summary/example2_saemimp/example2_saemimp.ctl (100%) rename integration/{ => postrun}/testdata/bbi_summary/example2_saemimp/example2_saemimp.ext (100%) rename integration/{ => postrun}/testdata/bbi_summary/example2_saemimp/example2_saemimp.lst (100%) rename integration/{ => postrun}/testdata/bbi_summary/example2_saemimp/example2_saemimp.shk (100%) rename integration/{ => postrun}/testdata/bbi_summary/example2_saemimp/saem.ext (100%) rename integration/{ => postrun}/testdata/bbi_summary/iovmm.mod (100%) rename integration/{ => postrun}/testdata/bbi_summary/iovmm/.gitignore (100%) rename integration/{ => postrun}/testdata/bbi_summary/iovmm/iovmm.cpu (100%) rename integration/{ => postrun}/testdata/bbi_summary/iovmm/iovmm.ext (100%) rename integration/{ => postrun}/testdata/bbi_summary/iovmm/iovmm.grd (100%) rename integration/{ => postrun}/testdata/bbi_summary/iovmm/iovmm.lst (100%) rename integration/{ => postrun}/testdata/bbi_summary/iovmm/iovmm.mod (100%) rename integration/{ => postrun}/testdata/bbi_summary/iovmm/iovmm.shk (100%) rename integration/{ => postrun}/testdata/bbi_summary/onlysim/onlysim.lst (100%) diff --git a/integration/execute.go b/integration/execute.go index 40197cd7..2fee0359 100644 --- a/integration/execute.go +++ b/integration/execute.go @@ -1,4 +1,4 @@ -package bbitest +package integration import ( "context" @@ -10,7 +10,7 @@ import ( log "github.com/sirupsen/logrus" ) -func executeCommand(ctx context.Context, command string, args ...string) (string, error) { +func ExecuteCommand(ctx context.Context, command string, args ...string) (string, error) { //Find it in path binary, _ := exec.LookPath(command) cmd := exec.CommandContext(ctx, binary, args...) @@ -40,7 +40,7 @@ func executeCommand(ctx context.Context, command string, args ...string) (string } // nolint:unparam -func executeCommandNoErrorCheck(ctx context.Context, command string, args ...string) (string, error) { +func ExecuteCommandNoErrorCheck(ctx context.Context, command string, args ...string) (string, error) { binary, _ := exec.LookPath(command) cmd := exec.CommandContext(ctx, binary, args...) cmd.Env = os.Environ() diff --git a/integration/nonmem/README.md b/integration/nonmem/README.md new file mode 100644 index 00000000..f15d6de2 --- /dev/null +++ b/integration/nonmem/README.md @@ -0,0 +1 @@ +This directory contains integration tests that rely on having NONMEM installed. diff --git a/integration/bbi_expansion_test.go b/integration/nonmem/bbi_expansion_test.go similarity index 96% rename from integration/bbi_expansion_test.go rename to integration/nonmem/bbi_expansion_test.go index 9c9bfd3d..0c21fa55 100644 --- a/integration/bbi_expansion_test.go +++ b/integration/nonmem/bbi_expansion_test.go @@ -1,4 +1,4 @@ -package bbitest +package nonmem import ( "context" @@ -8,6 +8,7 @@ import ( "strings" "testing" + . "github.com/metrumresearchgroup/bbi/integration" "github.com/metrumresearchgroup/bbi/utils" "github.com/metrumresearchgroup/wrapt" @@ -38,7 +39,7 @@ func TestBBIExpandsWithoutPrefix(tt *testing.T) { filepath.Join(scenario.Workpath, "model", targets), } - output, err := executeCommand(context.Background(), "bbi", commandAndArgs...) + output, err := ExecuteCommand(context.Background(), "bbi", commandAndArgs...) t.R.NoError(err) t.R.NotEmpty(output) @@ -107,7 +108,7 @@ func TestBBIExpandsWithPrefix(tt *testing.T) { filepath.Join(scenario.Workpath, "model", targets), } - output, err := executeCommand(context.Background(), "bbi", commandAndArgs...) + output, err := ExecuteCommand(context.Background(), "bbi", commandAndArgs...) t.R.NoError(err) t.R.NotEmpty(output) @@ -177,7 +178,7 @@ func TestBBIExpandsWithPrefixToPartialMatch(tt *testing.T) { filepath.Join(scenario.Workpath, "model", targets), } - output, err := executeCommand(context.Background(), "bbi", commandAndArgs...) + output, err := ExecuteCommand(context.Background(), "bbi", commandAndArgs...) t.R.NoError(err) t.R.NotEmpty(output) diff --git a/integration/bbi_local_test.go b/integration/nonmem/bbi_local_test.go similarity index 98% rename from integration/bbi_local_test.go rename to integration/nonmem/bbi_local_test.go index 2950db46..8ba18602 100644 --- a/integration/bbi_local_test.go +++ b/integration/nonmem/bbi_local_test.go @@ -1,4 +1,4 @@ -package bbitest +package nonmem import ( "context" @@ -8,6 +8,7 @@ import ( "testing" "time" + . "github.com/metrumresearchgroup/bbi/integration" "github.com/metrumresearchgroup/bbi/utils" "github.com/metrumresearchgroup/wrapt" @@ -135,7 +136,7 @@ func TestNMFEOptionsEndInScript(tt *testing.T) { // Now let's run the script that was generated t.R.NoError(os.Chdir(filepath.Join(scenario.Workpath, m.identifier))) - _, err = executeCommand(ctx, filepath.Join(scenario.Workpath, m.identifier, m.identifier+".sh")) + _, err = ExecuteCommand(ctx, filepath.Join(scenario.Workpath, m.identifier, m.identifier+".sh")) t.R.NoError(os.Chdir(whereami)) t.R.NoError(err) diff --git a/integration/bbi_sge_test.go b/integration/nonmem/bbi_sge_test.go similarity index 99% rename from integration/bbi_sge_test.go rename to integration/nonmem/bbi_sge_test.go index 1b98521e..221af427 100644 --- a/integration/bbi_sge_test.go +++ b/integration/nonmem/bbi_sge_test.go @@ -1,4 +1,4 @@ -package bbitest +package nonmem import ( "context" diff --git a/integration/config_test.go b/integration/nonmem/config_test.go similarity index 99% rename from integration/config_test.go rename to integration/nonmem/config_test.go index eb7fe947..d1d4aa24 100644 --- a/integration/config_test.go +++ b/integration/nonmem/config_test.go @@ -1,4 +1,4 @@ -package bbitest +package nonmem import ( "context" diff --git a/integration/data_test.go b/integration/nonmem/data_test.go similarity index 99% rename from integration/data_test.go rename to integration/nonmem/data_test.go index 1f9a566a..2b212ef6 100644 --- a/integration/data_test.go +++ b/integration/nonmem/data_test.go @@ -1,4 +1,4 @@ -package bbitest +package nonmem import ( "context" diff --git a/integration/files.go b/integration/nonmem/files.go similarity index 95% rename from integration/files.go rename to integration/nonmem/files.go index 12e5150f..0fb365d6 100644 --- a/integration/files.go +++ b/integration/nonmem/files.go @@ -1,4 +1,4 @@ -package bbitest +package nonmem import ( "io" diff --git a/integration/init_test.go b/integration/nonmem/init_test.go similarity index 94% rename from integration/init_test.go rename to integration/nonmem/init_test.go index e1d3c7c1..5c0c549a 100644 --- a/integration/init_test.go +++ b/integration/nonmem/init_test.go @@ -1,4 +1,4 @@ -package bbitest +package nonmem import ( "context" @@ -10,6 +10,7 @@ import ( "runtime" "testing" + . "github.com/metrumresearchgroup/bbi/integration" "github.com/metrumresearchgroup/bbi/utils" "github.com/metrumresearchgroup/wrapt" @@ -34,7 +35,7 @@ func TestInitialization(tt *testing.T) { scenario.Prepare(t, context.Background()) t.Run(fmt.Sprintf("init_%s", scenario.identifier), func(t *wrapt.T) { - _, err := executeCommand(context.Background(), "bbi", "init", "--dir", os.Getenv("NONMEMROOT")) + _, err := ExecuteCommand(context.Background(), "bbi", "init", "--dir", os.Getenv("NONMEMROOT")) t.R.NoError(err) t.A.FileExists(filepath.Join(scenario.Workpath, "bbi.yaml")) diff --git a/integration/nmqual_test.go b/integration/nonmem/nmqual_test.go similarity index 99% rename from integration/nmqual_test.go rename to integration/nonmem/nmqual_test.go index 39668a50..84a220f3 100644 --- a/integration/nmqual_test.go +++ b/integration/nonmem/nmqual_test.go @@ -1,4 +1,4 @@ -package bbitest +package nonmem import ( "context" diff --git a/integration/nonmem.go b/integration/nonmem/nonmem.go similarity index 99% rename from integration/nonmem.go rename to integration/nonmem/nonmem.go index e7848429..829e81fb 100644 --- a/integration/nonmem.go +++ b/integration/nonmem/nonmem.go @@ -1,4 +1,4 @@ -package bbitest +package nonmem import ( "crypto/md5" diff --git a/integration/postexecution_test.go b/integration/nonmem/postexecution_test.go similarity index 99% rename from integration/postexecution_test.go rename to integration/nonmem/postexecution_test.go index b80d39e3..d71202b8 100644 --- a/integration/postexecution_test.go +++ b/integration/nonmem/postexecution_test.go @@ -1,4 +1,4 @@ -package bbitest +package nonmem import ( "bufio" diff --git a/integration/setup.go b/integration/nonmem/setup.go similarity index 95% rename from integration/setup.go rename to integration/nonmem/setup.go index 7bc31b2c..a692947a 100644 --- a/integration/setup.go +++ b/integration/nonmem/setup.go @@ -1,4 +1,4 @@ -package bbitest +package nonmem import ( "archive/tar" @@ -13,6 +13,8 @@ import ( "strconv" "strings" + . "github.com/metrumresearchgroup/bbi/integration" + "github.com/metrumresearchgroup/wrapt" log "github.com/sirupsen/logrus" "github.com/spf13/afero" @@ -22,13 +24,6 @@ import ( var ROOT_EXECUTION_DIR string var EXECUTION_DIR string -// constants and variables used in summary tests. -const SUMMARY_TEST_DIR = "testdata/bbi_summary" -const SUMMARY_GOLD_DIR = "aa_golden_files" -const noSuchFileError = "no such file or directory" -const noFilePresentError = "no file present at" -const wrongExtensionError = "Must provide path to .lst" - type Scenario struct { Details ScenarioDetails ctx context.Context @@ -66,7 +61,7 @@ func (m Model) Execute(scenario *Scenario, args ...string) (string, error) { filepath.Join(scenario.Workpath, m.filename), }...) - return executeCommand(scenario.ctx, "bbi", cmdArguments...) + return ExecuteCommand(scenario.ctx, "bbi", cmdArguments...) } var ErrNoModelsLocated = errors.New("no model directories were located in the provided scenario") @@ -436,7 +431,7 @@ func findModelFiles(path string) []string { func (scenario *Scenario) Prepare(t *wrapt.T, ctx context.Context) { t.Helper() - _, err := executeCommand(ctx, "bbi", "init", "--dir", os.Getenv("NONMEMROOT")) + _, err := ExecuteCommand(ctx, "bbi", "init", "--dir", os.Getenv("NONMEMROOT")) t.R.NoError(err) fs := afero.NewOsFs() @@ -456,7 +451,7 @@ func (scenario *Scenario) Prepare(t *wrapt.T, ctx context.Context) { t.R.NoError(os.Chdir(scenario.Workpath)) - _, err = executeCommand(ctx, "bbi", "init", "--dir", os.Getenv("NONMEMROOT")) + _, err = ExecuteCommand(ctx, "bbi", "init", "--dir", os.Getenv("NONMEMROOT")) t.R.NoError(err) t.R.NoError(os.Chdir(whereami)) diff --git a/integration/testdata/.gitignore b/integration/nonmem/testdata/.gitignore similarity index 100% rename from integration/testdata/.gitignore rename to integration/nonmem/testdata/.gitignore diff --git a/integration/testdata/acop/.gitignore b/integration/nonmem/testdata/acop/.gitignore similarity index 100% rename from integration/testdata/acop/.gitignore rename to integration/nonmem/testdata/acop/.gitignore diff --git a/integration/testdata/acop/acop.csv b/integration/nonmem/testdata/acop/acop.csv similarity index 100% rename from integration/testdata/acop/acop.csv rename to integration/nonmem/testdata/acop/acop.csv diff --git a/integration/testdata/acop/acop.mod b/integration/nonmem/testdata/acop/acop.mod similarity index 100% rename from integration/testdata/acop/acop.mod rename to integration/nonmem/testdata/acop/acop.mod diff --git a/integration/testdata/acop/acoptar.gz b/integration/nonmem/testdata/acop/acoptar.gz similarity index 100% rename from integration/testdata/acop/acoptar.gz rename to integration/nonmem/testdata/acop/acoptar.gz diff --git a/integration/testdata/acop/scenario.json b/integration/nonmem/testdata/acop/scenario.json similarity index 100% rename from integration/testdata/acop/scenario.json rename to integration/nonmem/testdata/acop/scenario.json diff --git a/integration/testdata/bbi_expansion/data/derived/acop.csv b/integration/nonmem/testdata/bbi_expansion/data/derived/acop.csv similarity index 100% rename from integration/testdata/bbi_expansion/data/derived/acop.csv rename to integration/nonmem/testdata/bbi_expansion/data/derived/acop.csv diff --git a/integration/testdata/bbi_expansion/model/101.ctl b/integration/nonmem/testdata/bbi_expansion/model/101.ctl similarity index 100% rename from integration/testdata/bbi_expansion/model/101.ctl rename to integration/nonmem/testdata/bbi_expansion/model/101.ctl diff --git a/integration/testdata/bbi_expansion/model/102.ctl b/integration/nonmem/testdata/bbi_expansion/model/102.ctl similarity index 100% rename from integration/testdata/bbi_expansion/model/102.ctl rename to integration/nonmem/testdata/bbi_expansion/model/102.ctl diff --git a/integration/testdata/bbi_expansion/model/103.ctl b/integration/nonmem/testdata/bbi_expansion/model/103.ctl similarity index 100% rename from integration/testdata/bbi_expansion/model/103.ctl rename to integration/nonmem/testdata/bbi_expansion/model/103.ctl diff --git a/integration/testdata/bbi_expansion/model/104.ctl b/integration/nonmem/testdata/bbi_expansion/model/104.ctl similarity index 100% rename from integration/testdata/bbi_expansion/model/104.ctl rename to integration/nonmem/testdata/bbi_expansion/model/104.ctl diff --git a/integration/testdata/bbi_expansion/model/105.ctl b/integration/nonmem/testdata/bbi_expansion/model/105.ctl similarity index 100% rename from integration/testdata/bbi_expansion/model/105.ctl rename to integration/nonmem/testdata/bbi_expansion/model/105.ctl diff --git a/integration/testdata/bbi_expansion/model/bbi_mainrun_101.ctl b/integration/nonmem/testdata/bbi_expansion/model/bbi_mainrun_101.ctl similarity index 100% rename from integration/testdata/bbi_expansion/model/bbi_mainrun_101.ctl rename to integration/nonmem/testdata/bbi_expansion/model/bbi_mainrun_101.ctl diff --git a/integration/testdata/bbi_expansion/model/bbi_mainrun_102.ctl b/integration/nonmem/testdata/bbi_expansion/model/bbi_mainrun_102.ctl similarity index 100% rename from integration/testdata/bbi_expansion/model/bbi_mainrun_102.ctl rename to integration/nonmem/testdata/bbi_expansion/model/bbi_mainrun_102.ctl diff --git a/integration/testdata/bbi_expansion/model/bbi_mainrun_103.ctl b/integration/nonmem/testdata/bbi_expansion/model/bbi_mainrun_103.ctl similarity index 100% rename from integration/testdata/bbi_expansion/model/bbi_mainrun_103.ctl rename to integration/nonmem/testdata/bbi_expansion/model/bbi_mainrun_103.ctl diff --git a/integration/testdata/bbi_expansion/scenario.json b/integration/nonmem/testdata/bbi_expansion/scenario.json similarity index 100% rename from integration/testdata/bbi_expansion/scenario.json rename to integration/nonmem/testdata/bbi_expansion/scenario.json diff --git a/integration/testdata/ctl_test/acop.csv b/integration/nonmem/testdata/ctl_test/acop.csv similarity index 100% rename from integration/testdata/ctl_test/acop.csv rename to integration/nonmem/testdata/ctl_test/acop.csv diff --git a/integration/testdata/ctl_test/acop.ctl b/integration/nonmem/testdata/ctl_test/acop.ctl similarity index 100% rename from integration/testdata/ctl_test/acop.ctl rename to integration/nonmem/testdata/ctl_test/acop.ctl diff --git a/integration/testdata/ctl_test/scenario.json b/integration/nonmem/testdata/ctl_test/scenario.json similarity index 100% rename from integration/testdata/ctl_test/scenario.json rename to integration/nonmem/testdata/ctl_test/scenario.json diff --git a/integration/testdata/datacomment/acop.csv b/integration/nonmem/testdata/datacomment/acop.csv similarity index 100% rename from integration/testdata/datacomment/acop.csv rename to integration/nonmem/testdata/datacomment/acop.csv diff --git a/integration/testdata/datacomment/acop.ctl b/integration/nonmem/testdata/datacomment/acop.ctl similarity index 100% rename from integration/testdata/datacomment/acop.ctl rename to integration/nonmem/testdata/datacomment/acop.ctl diff --git a/integration/testdata/datacomment/scenario.json b/integration/nonmem/testdata/datacomment/scenario.json similarity index 100% rename from integration/testdata/datacomment/scenario.json rename to integration/nonmem/testdata/datacomment/scenario.json diff --git a/integration/testdata/leading-path-with space/acop.csv b/integration/nonmem/testdata/leading-path-with space/acop.csv similarity index 100% rename from integration/testdata/leading-path-with space/acop.csv rename to integration/nonmem/testdata/leading-path-with space/acop.csv diff --git a/integration/testdata/leading-path-with space/acop.ctl b/integration/nonmem/testdata/leading-path-with space/acop.ctl similarity index 100% rename from integration/testdata/leading-path-with space/acop.ctl rename to integration/nonmem/testdata/leading-path-with space/acop.ctl diff --git a/integration/testdata/leading-path-with space/scenario.json b/integration/nonmem/testdata/leading-path-with space/scenario.json similarity index 100% rename from integration/testdata/leading-path-with space/scenario.json rename to integration/nonmem/testdata/leading-path-with space/scenario.json diff --git a/integration/testdata/metrum_std/data/derived/Data.csv b/integration/nonmem/testdata/metrum_std/data/derived/Data.csv similarity index 100% rename from integration/testdata/metrum_std/data/derived/Data.csv rename to integration/nonmem/testdata/metrum_std/data/derived/Data.csv diff --git a/integration/testdata/metrum_std/model/nonmem/test_suite_1/acop.ctl b/integration/nonmem/testdata/metrum_std/model/nonmem/test_suite_1/acop.ctl similarity index 100% rename from integration/testdata/metrum_std/model/nonmem/test_suite_1/acop.ctl rename to integration/nonmem/testdata/metrum_std/model/nonmem/test_suite_1/acop.ctl diff --git a/integration/testdata/metrum_std/model/nonmem/test_suite_1/acop2.mod b/integration/nonmem/testdata/metrum_std/model/nonmem/test_suite_1/acop2.mod similarity index 100% rename from integration/testdata/metrum_std/model/nonmem/test_suite_1/acop2.mod rename to integration/nonmem/testdata/metrum_std/model/nonmem/test_suite_1/acop2.mod diff --git a/integration/testdata/metrum_std/scenario.json b/integration/nonmem/testdata/metrum_std/scenario.json similarity index 100% rename from integration/testdata/metrum_std/scenario.json rename to integration/nonmem/testdata/metrum_std/scenario.json diff --git a/integration/testdata/modquote/acop.csv b/integration/nonmem/testdata/modquote/acop.csv similarity index 100% rename from integration/testdata/modquote/acop.csv rename to integration/nonmem/testdata/modquote/acop.csv diff --git a/integration/testdata/modquote/m'd.ctl b/integration/nonmem/testdata/modquote/m'd.ctl similarity index 100% rename from integration/testdata/modquote/m'd.ctl rename to integration/nonmem/testdata/modquote/m'd.ctl diff --git a/integration/testdata/modquote/scenario.json b/integration/nonmem/testdata/modquote/scenario.json similarity index 100% rename from integration/testdata/modquote/scenario.json rename to integration/nonmem/testdata/modquote/scenario.json diff --git a/integration/testdata/period_test/acop.1.ctl b/integration/nonmem/testdata/period_test/acop.1.ctl similarity index 100% rename from integration/testdata/period_test/acop.1.ctl rename to integration/nonmem/testdata/period_test/acop.1.ctl diff --git a/integration/testdata/period_test/acop.csv b/integration/nonmem/testdata/period_test/acop.csv similarity index 100% rename from integration/testdata/period_test/acop.csv rename to integration/nonmem/testdata/period_test/acop.csv diff --git a/integration/testdata/period_test/scenario.json b/integration/nonmem/testdata/period_test/scenario.json similarity index 100% rename from integration/testdata/period_test/scenario.json rename to integration/nonmem/testdata/period_test/scenario.json diff --git a/integration/README.md b/integration/postrun/README.md similarity index 70% rename from integration/README.md rename to integration/postrun/README.md index fec46efd..9252bbe9 100644 --- a/integration/README.md +++ b/integration/postrun/README.md @@ -1,5 +1,5 @@ -# bbitest -This directory contains integration tests data. Many of these tests must be run in an environment containing a working NONMEM installation and/or worker nodes that can be used to execute jobs. See [`.drone.yml`](/.drone.yml) for examples. +This directory contains integration tests that do _not_ rely on having +NONMEM installed. ## Refreshing golden files The `bbi nonmem summary` tests (in `integration/bbi_summary_test.go`) use golden files stored in `integration/testdata/bbi_summary/aa_golden_files/`. These need to be refreshed when the relevant functionality in `bbi` changes. This can be done by running the tests with the `UPDATE_SUMMARY=true` environment variable, like so: diff --git a/integration/bbi_covcor_test.go b/integration/postrun/bbi_covcor_test.go similarity index 88% rename from integration/bbi_covcor_test.go rename to integration/postrun/bbi_covcor_test.go index 3afe7123..a157bba4 100644 --- a/integration/bbi_covcor_test.go +++ b/integration/postrun/bbi_covcor_test.go @@ -1,4 +1,4 @@ -package bbitest +package postrun import ( "context" @@ -7,6 +7,7 @@ import ( "regexp" "testing" + . "github.com/metrumresearchgroup/bbi/integration" "github.com/metrumresearchgroup/bbi/utils" "github.com/metrumresearchgroup/wrapt" @@ -32,7 +33,7 @@ func TestCovCorHappyPath(tt *testing.T) { filepath.Join(SUMMARY_TEST_DIR, mod.name, mod.name), } - output, err := executeCommand(context.Background(), "bbi", commandAndArgs...) + output, err := ExecuteCommand(context.Background(), "bbi", commandAndArgs...) t.R.NoError(err) t.R.NotEmpty(output) @@ -74,7 +75,7 @@ func TestCovCorErrors(tt *testing.T) { // try without flag and get error var output string - output, err := executeCommandNoErrorCheck(context.Background(), "bbi", commandAndArgs...) + output, err := ExecuteCommandNoErrorCheck(context.Background(), "bbi", commandAndArgs...) t.R.Error(err) errorMatch := rgx.MatchString(output) diff --git a/integration/bbi_params_test.go b/integration/postrun/bbi_params_test.go similarity index 90% rename from integration/bbi_params_test.go rename to integration/postrun/bbi_params_test.go index 3e06271a..7c456d40 100644 --- a/integration/bbi_params_test.go +++ b/integration/postrun/bbi_params_test.go @@ -1,4 +1,4 @@ -package bbitest +package postrun import ( "context" @@ -6,6 +6,7 @@ import ( "path/filepath" "testing" + . "github.com/metrumresearchgroup/bbi/integration" "github.com/metrumresearchgroup/bbi/utils" "github.com/metrumresearchgroup/wrapt" ) @@ -38,7 +39,7 @@ func TestParamsSingleModel(tt *testing.T) { commandAndArgs = append(commandAndArgs, tc.bbiOption) } - output, err := executeCommand(context.Background(), "bbi", commandAndArgs...) + output, err := ExecuteCommand(context.Background(), "bbi", commandAndArgs...) t.R.NoError(err) t.R.NotEmpty(output) @@ -74,7 +75,7 @@ func TestParamsDir(tt *testing.T) { commandAndArgs = append(commandAndArgs, tc.bbiOption) } - output, err := executeCommand(context.Background(), "bbi", commandAndArgs...) + output, err := ExecuteCommand(context.Background(), "bbi", commandAndArgs...) t.R.NoError(err) t.R.NotEmpty(output) diff --git a/integration/bbi_reclean_test.go b/integration/postrun/bbi_reclean_test.go similarity index 82% rename from integration/bbi_reclean_test.go rename to integration/postrun/bbi_reclean_test.go index c82e601a..fc426fce 100644 --- a/integration/bbi_reclean_test.go +++ b/integration/postrun/bbi_reclean_test.go @@ -1,4 +1,4 @@ -package bbitest +package postrun import ( "context" @@ -7,6 +7,7 @@ import ( "regexp" "testing" + . "github.com/metrumresearchgroup/bbi/integration" "github.com/metrumresearchgroup/wrapt" ) @@ -22,7 +23,7 @@ func TestBBIRecleanBasic(tt *testing.T) { _ = os.WriteFile(fdataCSV, []byte("fake"), 0644) t.A.FileExists(fdataCSV) - output, err := executeCommand(context.Background(), + output, err := ExecuteCommand(context.Background(), "bbi", "nonmem", "reclean", "--recleanLvl=1", "-v", dir) t.R.NoError(err) t.R.NotEmpty(output) @@ -33,7 +34,7 @@ func TestBBIRecleanBasic(tt *testing.T) { func TestBBIRecleanError(tt *testing.T) { t := wrapt.WrapT(tt) - output, err := executeCommandNoErrorCheck(context.Background(), + output, err := ExecuteCommandNoErrorCheck(context.Background(), "bbi", "nonmem", "reclean") t.R.NotNil(err) diff --git a/integration/bbi_summary_test.go b/integration/postrun/bbi_summary_test.go similarity index 94% rename from integration/bbi_summary_test.go rename to integration/postrun/bbi_summary_test.go index 2715affa..91c03167 100644 --- a/integration/bbi_summary_test.go +++ b/integration/postrun/bbi_summary_test.go @@ -1,4 +1,4 @@ -package bbitest +package postrun import ( "context" @@ -7,6 +7,7 @@ import ( "regexp" "testing" + . "github.com/metrumresearchgroup/bbi/integration" "github.com/metrumresearchgroup/bbi/utils" "github.com/metrumresearchgroup/wrapt" @@ -64,7 +65,7 @@ func TestSummaryHappyPath(tt *testing.T) { commandAndArgs = append(commandAndArgs, tc.bbiOption) } - output, err := executeCommand(context.Background(), "bbi", commandAndArgs...) + output, err := ExecuteCommand(context.Background(), "bbi", commandAndArgs...) t.R.NoError(err) t.R.NotEmpty(output) @@ -130,14 +131,14 @@ func TestSummaryArgs(tt *testing.T) { } // try without flag and get error - output, err := executeCommandNoErrorCheck(context.Background(), "bbi", commandAndArgs...) + output, err := ExecuteCommandNoErrorCheck(context.Background(), "bbi", commandAndArgs...) t.R.NotNil(err) errorMatch, _ := regexp.MatchString(tm.errorRegEx, output) t.R.True(errorMatch) // append flag and get success commandAndArgs = append(commandAndArgs, tm.bbiArg) - output, err = executeCommand(context.Background(), "bbi", commandAndArgs...) + output, err = ExecuteCommand(context.Background(), "bbi", commandAndArgs...) t.R.NoError(err) t.R.NotEmpty(output) @@ -216,7 +217,7 @@ func TestSummaryErrors(tt *testing.T) { args = append(args, tc.bbiArgs...) } args = append(args, filepath.Join(SUMMARY_TEST_DIR, tc.testPath)) - output, err := executeCommandNoErrorCheck(context.Background(), "bbi", args...) + output, err := ExecuteCommandNoErrorCheck(context.Background(), "bbi", args...) t.R.NotNil(err) errorMatch, _ := regexp.MatchString(tc.errorMsg, output) t.R.True(errorMatch) @@ -237,7 +238,7 @@ func TestSummaryHappyPathNoExtension(tt *testing.T) { filepath.Join(SUMMARY_TEST_DIR, mod, mod), // adding no extension should work } - output, err := executeCommand(context.Background(), "bbi", commandAndArgs...) + output, err := ExecuteCommand(context.Background(), "bbi", commandAndArgs...) t.R.NoError(err) t.R.NotEmpty(output) @@ -268,7 +269,7 @@ func TestSummaryHappyPathMultipleModels(tt *testing.T) { if tc.bbiOption != "" { commandAndArgs = append(commandAndArgs, tc.bbiOption) } - output, err := executeCommand(context.Background(), "bbi", commandAndArgs...) + output, err := ExecuteCommand(context.Background(), "bbi", commandAndArgs...) gtd := GoldenFileTestingDetails{ outputString: output, @@ -306,7 +307,7 @@ func TestSummaryPathMultipleModelsError(tt *testing.T) { if tc.bbiOption != "" { commandAndArgs = append(commandAndArgs, tc.bbiOption) } - output, err := executeCommandNoErrorCheck(context.Background(), + output, err := ExecuteCommandNoErrorCheck(context.Background(), "bbi", commandAndArgs...) // Avoid testing plain output with golden file due to diff --git a/integration/golden_util.go b/integration/postrun/golden_util.go similarity index 98% rename from integration/golden_util.go rename to integration/postrun/golden_util.go index f5340c98..743136ac 100644 --- a/integration/golden_util.go +++ b/integration/postrun/golden_util.go @@ -1,4 +1,4 @@ -package bbitest +package postrun import ( "fmt" diff --git a/integration/postrun/setup.go b/integration/postrun/setup.go new file mode 100644 index 00000000..7250ffa0 --- /dev/null +++ b/integration/postrun/setup.go @@ -0,0 +1,8 @@ +package postrun + +// constants and variables used in summary tests. +const SUMMARY_TEST_DIR = "testdata/bbi_summary" +const SUMMARY_GOLD_DIR = "aa_golden_files" +const noSuchFileError = "no such file or directory" +const noFilePresentError = "no file present at" +const wrongExtensionError = "Must provide path to .lst" diff --git a/integration/testdata/bbi_summary/1001.ctl b/integration/postrun/testdata/bbi_summary/1001.ctl similarity index 100% rename from integration/testdata/bbi_summary/1001.ctl rename to integration/postrun/testdata/bbi_summary/1001.ctl diff --git a/integration/testdata/bbi_summary/1001/.gitignore b/integration/postrun/testdata/bbi_summary/1001/.gitignore similarity index 100% rename from integration/testdata/bbi_summary/1001/.gitignore rename to integration/postrun/testdata/bbi_summary/1001/.gitignore diff --git a/integration/testdata/bbi_summary/1001/1001.1.TXT b/integration/postrun/testdata/bbi_summary/1001/1001.1.TXT similarity index 100% rename from integration/testdata/bbi_summary/1001/1001.1.TXT rename to integration/postrun/testdata/bbi_summary/1001/1001.1.TXT diff --git a/integration/testdata/bbi_summary/1001/1001.cor b/integration/postrun/testdata/bbi_summary/1001/1001.cor similarity index 100% rename from integration/testdata/bbi_summary/1001/1001.cor rename to integration/postrun/testdata/bbi_summary/1001/1001.cor diff --git a/integration/testdata/bbi_summary/1001/1001.cov b/integration/postrun/testdata/bbi_summary/1001/1001.cov similarity index 100% rename from integration/testdata/bbi_summary/1001/1001.cov rename to integration/postrun/testdata/bbi_summary/1001/1001.cov diff --git a/integration/testdata/bbi_summary/1001/1001.cpu b/integration/postrun/testdata/bbi_summary/1001/1001.cpu similarity index 100% rename from integration/testdata/bbi_summary/1001/1001.cpu rename to integration/postrun/testdata/bbi_summary/1001/1001.cpu diff --git a/integration/testdata/bbi_summary/1001/1001.ctl b/integration/postrun/testdata/bbi_summary/1001/1001.ctl similarity index 100% rename from integration/testdata/bbi_summary/1001/1001.ctl rename to integration/postrun/testdata/bbi_summary/1001/1001.ctl diff --git a/integration/testdata/bbi_summary/1001/1001.ext b/integration/postrun/testdata/bbi_summary/1001/1001.ext similarity index 100% rename from integration/testdata/bbi_summary/1001/1001.ext rename to integration/postrun/testdata/bbi_summary/1001/1001.ext diff --git a/integration/testdata/bbi_summary/1001/1001.lst b/integration/postrun/testdata/bbi_summary/1001/1001.lst similarity index 100% rename from integration/testdata/bbi_summary/1001/1001.lst rename to integration/postrun/testdata/bbi_summary/1001/1001.lst diff --git a/integration/testdata/bbi_summary/1001/PRDERR b/integration/postrun/testdata/bbi_summary/1001/PRDERR similarity index 100% rename from integration/testdata/bbi_summary/1001/PRDERR rename to integration/postrun/testdata/bbi_summary/1001/PRDERR diff --git a/integration/testdata/bbi_summary/12-empty-problem/12-empty-problem.ext b/integration/postrun/testdata/bbi_summary/12-empty-problem/12-empty-problem.ext similarity index 100% rename from integration/testdata/bbi_summary/12-empty-problem/12-empty-problem.ext rename to integration/postrun/testdata/bbi_summary/12-empty-problem/12-empty-problem.ext diff --git a/integration/testdata/bbi_summary/12-empty-problem/12-empty-problem.grd b/integration/postrun/testdata/bbi_summary/12-empty-problem/12-empty-problem.grd similarity index 100% rename from integration/testdata/bbi_summary/12-empty-problem/12-empty-problem.grd rename to integration/postrun/testdata/bbi_summary/12-empty-problem/12-empty-problem.grd diff --git a/integration/testdata/bbi_summary/12-empty-problem/12-empty-problem.lst b/integration/postrun/testdata/bbi_summary/12-empty-problem/12-empty-problem.lst similarity index 100% rename from integration/testdata/bbi_summary/12-empty-problem/12-empty-problem.lst rename to integration/postrun/testdata/bbi_summary/12-empty-problem/12-empty-problem.lst diff --git a/integration/testdata/bbi_summary/12-empty-problem/12-empty-problem.shk b/integration/postrun/testdata/bbi_summary/12-empty-problem/12-empty-problem.shk similarity index 100% rename from integration/testdata/bbi_summary/12-empty-problem/12-empty-problem.shk rename to integration/postrun/testdata/bbi_summary/12-empty-problem/12-empty-problem.shk diff --git a/integration/testdata/bbi_summary/12-invalid-lst/12-invalid-lst.cpu b/integration/postrun/testdata/bbi_summary/12-invalid-lst/12-invalid-lst.cpu similarity index 100% rename from integration/testdata/bbi_summary/12-invalid-lst/12-invalid-lst.cpu rename to integration/postrun/testdata/bbi_summary/12-invalid-lst/12-invalid-lst.cpu diff --git a/integration/testdata/bbi_summary/12-invalid-lst/12-invalid-lst.ctl b/integration/postrun/testdata/bbi_summary/12-invalid-lst/12-invalid-lst.ctl similarity index 100% rename from integration/testdata/bbi_summary/12-invalid-lst/12-invalid-lst.ctl rename to integration/postrun/testdata/bbi_summary/12-invalid-lst/12-invalid-lst.ctl diff --git a/integration/testdata/bbi_summary/12-invalid-lst/12-invalid-lst.ext b/integration/postrun/testdata/bbi_summary/12-invalid-lst/12-invalid-lst.ext similarity index 100% rename from integration/testdata/bbi_summary/12-invalid-lst/12-invalid-lst.ext rename to integration/postrun/testdata/bbi_summary/12-invalid-lst/12-invalid-lst.ext diff --git a/integration/testdata/bbi_summary/12-invalid-lst/12-invalid-lst.grd b/integration/postrun/testdata/bbi_summary/12-invalid-lst/12-invalid-lst.grd similarity index 100% rename from integration/testdata/bbi_summary/12-invalid-lst/12-invalid-lst.grd rename to integration/postrun/testdata/bbi_summary/12-invalid-lst/12-invalid-lst.grd diff --git a/integration/testdata/bbi_summary/12-invalid-lst/12-invalid-lst.lst b/integration/postrun/testdata/bbi_summary/12-invalid-lst/12-invalid-lst.lst similarity index 100% rename from integration/testdata/bbi_summary/12-invalid-lst/12-invalid-lst.lst rename to integration/postrun/testdata/bbi_summary/12-invalid-lst/12-invalid-lst.lst diff --git a/integration/testdata/bbi_summary/12-invalid-lst/12-invalid-lst.shk b/integration/postrun/testdata/bbi_summary/12-invalid-lst/12-invalid-lst.shk similarity index 100% rename from integration/testdata/bbi_summary/12-invalid-lst/12-invalid-lst.shk rename to integration/postrun/testdata/bbi_summary/12-invalid-lst/12-invalid-lst.shk diff --git a/integration/testdata/bbi_summary/12.ctl b/integration/postrun/testdata/bbi_summary/12.ctl similarity index 100% rename from integration/testdata/bbi_summary/12.ctl rename to integration/postrun/testdata/bbi_summary/12.ctl diff --git a/integration/testdata/bbi_summary/12/.gitignore b/integration/postrun/testdata/bbi_summary/12/.gitignore similarity index 100% rename from integration/testdata/bbi_summary/12/.gitignore rename to integration/postrun/testdata/bbi_summary/12/.gitignore diff --git a/integration/testdata/bbi_summary/12/12.cpu b/integration/postrun/testdata/bbi_summary/12/12.cpu similarity index 100% rename from integration/testdata/bbi_summary/12/12.cpu rename to integration/postrun/testdata/bbi_summary/12/12.cpu diff --git a/integration/testdata/bbi_summary/12/12.ctl b/integration/postrun/testdata/bbi_summary/12/12.ctl similarity index 100% rename from integration/testdata/bbi_summary/12/12.ctl rename to integration/postrun/testdata/bbi_summary/12/12.ctl diff --git a/integration/testdata/bbi_summary/12/12.ext b/integration/postrun/testdata/bbi_summary/12/12.ext similarity index 100% rename from integration/testdata/bbi_summary/12/12.ext rename to integration/postrun/testdata/bbi_summary/12/12.ext diff --git a/integration/testdata/bbi_summary/12/12.grd b/integration/postrun/testdata/bbi_summary/12/12.grd similarity index 100% rename from integration/testdata/bbi_summary/12/12.grd rename to integration/postrun/testdata/bbi_summary/12/12.grd diff --git a/integration/testdata/bbi_summary/12/12.lst b/integration/postrun/testdata/bbi_summary/12/12.lst similarity index 100% rename from integration/testdata/bbi_summary/12/12.lst rename to integration/postrun/testdata/bbi_summary/12/12.lst diff --git a/integration/testdata/bbi_summary/12/12.shk b/integration/postrun/testdata/bbi_summary/12/12.shk similarity index 100% rename from integration/testdata/bbi_summary/12/12.shk rename to integration/postrun/testdata/bbi_summary/12/12.shk diff --git a/integration/testdata/bbi_summary/66.ctl b/integration/postrun/testdata/bbi_summary/66.ctl similarity index 100% rename from integration/testdata/bbi_summary/66.ctl rename to integration/postrun/testdata/bbi_summary/66.ctl diff --git a/integration/testdata/bbi_summary/66/.gitignore b/integration/postrun/testdata/bbi_summary/66/.gitignore similarity index 100% rename from integration/testdata/bbi_summary/66/.gitignore rename to integration/postrun/testdata/bbi_summary/66/.gitignore diff --git a/integration/testdata/bbi_summary/66/66.cpu b/integration/postrun/testdata/bbi_summary/66/66.cpu similarity index 100% rename from integration/testdata/bbi_summary/66/66.cpu rename to integration/postrun/testdata/bbi_summary/66/66.cpu diff --git a/integration/testdata/bbi_summary/66/66.ctl b/integration/postrun/testdata/bbi_summary/66/66.ctl similarity index 100% rename from integration/testdata/bbi_summary/66/66.ctl rename to integration/postrun/testdata/bbi_summary/66/66.ctl diff --git a/integration/testdata/bbi_summary/66/66.ext b/integration/postrun/testdata/bbi_summary/66/66.ext similarity index 100% rename from integration/testdata/bbi_summary/66/66.ext rename to integration/postrun/testdata/bbi_summary/66/66.ext diff --git a/integration/testdata/bbi_summary/66/66.grd b/integration/postrun/testdata/bbi_summary/66/66.grd similarity index 100% rename from integration/testdata/bbi_summary/66/66.grd rename to integration/postrun/testdata/bbi_summary/66/66.grd diff --git a/integration/testdata/bbi_summary/66/66.lst b/integration/postrun/testdata/bbi_summary/66/66.lst similarity index 100% rename from integration/testdata/bbi_summary/66/66.lst rename to integration/postrun/testdata/bbi_summary/66/66.lst diff --git a/integration/testdata/bbi_summary/66/PRDERR b/integration/postrun/testdata/bbi_summary/66/PRDERR similarity index 100% rename from integration/testdata/bbi_summary/66/PRDERR rename to integration/postrun/testdata/bbi_summary/66/PRDERR diff --git a/integration/testdata/bbi_summary/aa_golden_files/1001.golden.covcor.json b/integration/postrun/testdata/bbi_summary/aa_golden_files/1001.golden.covcor.json similarity index 100% rename from integration/testdata/bbi_summary/aa_golden_files/1001.golden.covcor.json rename to integration/postrun/testdata/bbi_summary/aa_golden_files/1001.golden.covcor.json diff --git a/integration/testdata/bbi_summary/aa_golden_files/1001.golden.json b/integration/postrun/testdata/bbi_summary/aa_golden_files/1001.golden.json similarity index 100% rename from integration/testdata/bbi_summary/aa_golden_files/1001.golden.json rename to integration/postrun/testdata/bbi_summary/aa_golden_files/1001.golden.json diff --git a/integration/testdata/bbi_summary/aa_golden_files/1001.golden.txt b/integration/postrun/testdata/bbi_summary/aa_golden_files/1001.golden.txt similarity index 100% rename from integration/testdata/bbi_summary/aa_golden_files/1001.golden.txt rename to integration/postrun/testdata/bbi_summary/aa_golden_files/1001.golden.txt diff --git a/integration/testdata/bbi_summary/aa_golden_files/12-empty-problem.golden.json b/integration/postrun/testdata/bbi_summary/aa_golden_files/12-empty-problem.golden.json similarity index 100% rename from integration/testdata/bbi_summary/aa_golden_files/12-empty-problem.golden.json rename to integration/postrun/testdata/bbi_summary/aa_golden_files/12-empty-problem.golden.json diff --git a/integration/testdata/bbi_summary/aa_golden_files/12-empty-problem.golden.txt b/integration/postrun/testdata/bbi_summary/aa_golden_files/12-empty-problem.golden.txt similarity index 100% rename from integration/testdata/bbi_summary/aa_golden_files/12-empty-problem.golden.txt rename to integration/postrun/testdata/bbi_summary/aa_golden_files/12-empty-problem.golden.txt diff --git a/integration/testdata/bbi_summary/aa_golden_files/12.golden.json b/integration/postrun/testdata/bbi_summary/aa_golden_files/12.golden.json similarity index 100% rename from integration/testdata/bbi_summary/aa_golden_files/12.golden.json rename to integration/postrun/testdata/bbi_summary/aa_golden_files/12.golden.json diff --git a/integration/testdata/bbi_summary/aa_golden_files/12.golden.txt b/integration/postrun/testdata/bbi_summary/aa_golden_files/12.golden.txt similarity index 100% rename from integration/testdata/bbi_summary/aa_golden_files/12.golden.txt rename to integration/postrun/testdata/bbi_summary/aa_golden_files/12.golden.txt diff --git a/integration/testdata/bbi_summary/aa_golden_files/66.golden.json b/integration/postrun/testdata/bbi_summary/aa_golden_files/66.golden.json similarity index 100% rename from integration/testdata/bbi_summary/aa_golden_files/66.golden.json rename to integration/postrun/testdata/bbi_summary/aa_golden_files/66.golden.json diff --git a/integration/testdata/bbi_summary/aa_golden_files/66.golden.txt b/integration/postrun/testdata/bbi_summary/aa_golden_files/66.golden.txt similarity index 100% rename from integration/testdata/bbi_summary/aa_golden_files/66.golden.txt rename to integration/postrun/testdata/bbi_summary/aa_golden_files/66.golden.txt diff --git a/integration/testdata/bbi_summary/aa_golden_files/acop-iov.golden.json b/integration/postrun/testdata/bbi_summary/aa_golden_files/acop-iov.golden.json similarity index 100% rename from integration/testdata/bbi_summary/aa_golden_files/acop-iov.golden.json rename to integration/postrun/testdata/bbi_summary/aa_golden_files/acop-iov.golden.json diff --git a/integration/testdata/bbi_summary/aa_golden_files/acop-iov.golden.txt b/integration/postrun/testdata/bbi_summary/aa_golden_files/acop-iov.golden.txt similarity index 100% rename from integration/testdata/bbi_summary/aa_golden_files/acop-iov.golden.txt rename to integration/postrun/testdata/bbi_summary/aa_golden_files/acop-iov.golden.txt diff --git a/integration/testdata/bbi_summary/aa_golden_files/acop-nan.golden.json b/integration/postrun/testdata/bbi_summary/aa_golden_files/acop-nan.golden.json similarity index 100% rename from integration/testdata/bbi_summary/aa_golden_files/acop-nan.golden.json rename to integration/postrun/testdata/bbi_summary/aa_golden_files/acop-nan.golden.json diff --git a/integration/testdata/bbi_summary/aa_golden_files/acop-nan.golden.txt b/integration/postrun/testdata/bbi_summary/aa_golden_files/acop-nan.golden.txt similarity index 100% rename from integration/testdata/bbi_summary/aa_golden_files/acop-nan.golden.txt rename to integration/postrun/testdata/bbi_summary/aa_golden_files/acop-nan.golden.txt diff --git a/integration/testdata/bbi_summary/aa_golden_files/acop.golden.covcor.json b/integration/postrun/testdata/bbi_summary/aa_golden_files/acop.golden.covcor.json similarity index 100% rename from integration/testdata/bbi_summary/aa_golden_files/acop.golden.covcor.json rename to integration/postrun/testdata/bbi_summary/aa_golden_files/acop.golden.covcor.json diff --git a/integration/testdata/bbi_summary/aa_golden_files/acop.golden.json b/integration/postrun/testdata/bbi_summary/aa_golden_files/acop.golden.json similarity index 100% rename from integration/testdata/bbi_summary/aa_golden_files/acop.golden.json rename to integration/postrun/testdata/bbi_summary/aa_golden_files/acop.golden.json diff --git a/integration/testdata/bbi_summary/aa_golden_files/acop.golden.txt b/integration/postrun/testdata/bbi_summary/aa_golden_files/acop.golden.txt similarity index 100% rename from integration/testdata/bbi_summary/aa_golden_files/acop.golden.txt rename to integration/postrun/testdata/bbi_summary/aa_golden_files/acop.golden.txt diff --git a/integration/testdata/bbi_summary/aa_golden_files/acop_no_grd.golden.json b/integration/postrun/testdata/bbi_summary/aa_golden_files/acop_no_grd.golden.json similarity index 100% rename from integration/testdata/bbi_summary/aa_golden_files/acop_no_grd.golden.json rename to integration/postrun/testdata/bbi_summary/aa_golden_files/acop_no_grd.golden.json diff --git a/integration/testdata/bbi_summary/aa_golden_files/acop_no_grd.golden.txt b/integration/postrun/testdata/bbi_summary/aa_golden_files/acop_no_grd.golden.txt similarity index 100% rename from integration/testdata/bbi_summary/aa_golden_files/acop_no_grd.golden.txt rename to integration/postrun/testdata/bbi_summary/aa_golden_files/acop_no_grd.golden.txt diff --git a/integration/testdata/bbi_summary/aa_golden_files/chain.golden.json b/integration/postrun/testdata/bbi_summary/aa_golden_files/chain.golden.json similarity index 100% rename from integration/testdata/bbi_summary/aa_golden_files/chain.golden.json rename to integration/postrun/testdata/bbi_summary/aa_golden_files/chain.golden.json diff --git a/integration/testdata/bbi_summary/aa_golden_files/chain.golden.txt b/integration/postrun/testdata/bbi_summary/aa_golden_files/chain.golden.txt similarity index 100% rename from integration/testdata/bbi_summary/aa_golden_files/chain.golden.txt rename to integration/postrun/testdata/bbi_summary/aa_golden_files/chain.golden.txt diff --git a/integration/testdata/bbi_summary/aa_golden_files/dir_bbi_summary.golden.params.csv b/integration/postrun/testdata/bbi_summary/aa_golden_files/dir_bbi_summary.golden.params.csv similarity index 100% rename from integration/testdata/bbi_summary/aa_golden_files/dir_bbi_summary.golden.params.csv rename to integration/postrun/testdata/bbi_summary/aa_golden_files/dir_bbi_summary.golden.params.csv diff --git a/integration/testdata/bbi_summary/aa_golden_files/dir_bbi_summary.golden.params.json b/integration/postrun/testdata/bbi_summary/aa_golden_files/dir_bbi_summary.golden.params.json similarity index 100% rename from integration/testdata/bbi_summary/aa_golden_files/dir_bbi_summary.golden.params.json rename to integration/postrun/testdata/bbi_summary/aa_golden_files/dir_bbi_summary.golden.params.json diff --git a/integration/testdata/bbi_summary/aa_golden_files/example2_bayes.golden.json b/integration/postrun/testdata/bbi_summary/aa_golden_files/example2_bayes.golden.json similarity index 100% rename from integration/testdata/bbi_summary/aa_golden_files/example2_bayes.golden.json rename to integration/postrun/testdata/bbi_summary/aa_golden_files/example2_bayes.golden.json diff --git a/integration/testdata/bbi_summary/aa_golden_files/example2_bayes.golden.params.csv b/integration/postrun/testdata/bbi_summary/aa_golden_files/example2_bayes.golden.params.csv similarity index 100% rename from integration/testdata/bbi_summary/aa_golden_files/example2_bayes.golden.params.csv rename to integration/postrun/testdata/bbi_summary/aa_golden_files/example2_bayes.golden.params.csv diff --git a/integration/testdata/bbi_summary/aa_golden_files/example2_bayes.golden.params.json b/integration/postrun/testdata/bbi_summary/aa_golden_files/example2_bayes.golden.params.json similarity index 100% rename from integration/testdata/bbi_summary/aa_golden_files/example2_bayes.golden.params.json rename to integration/postrun/testdata/bbi_summary/aa_golden_files/example2_bayes.golden.params.json diff --git a/integration/testdata/bbi_summary/aa_golden_files/example2_bayes.golden.txt b/integration/postrun/testdata/bbi_summary/aa_golden_files/example2_bayes.golden.txt similarity index 100% rename from integration/testdata/bbi_summary/aa_golden_files/example2_bayes.golden.txt rename to integration/postrun/testdata/bbi_summary/aa_golden_files/example2_bayes.golden.txt diff --git a/integration/testdata/bbi_summary/aa_golden_files/example2_itsimp.golden.covcor.json b/integration/postrun/testdata/bbi_summary/aa_golden_files/example2_itsimp.golden.covcor.json similarity index 100% rename from integration/testdata/bbi_summary/aa_golden_files/example2_itsimp.golden.covcor.json rename to integration/postrun/testdata/bbi_summary/aa_golden_files/example2_itsimp.golden.covcor.json diff --git a/integration/testdata/bbi_summary/aa_golden_files/example2_itsimp.golden.json b/integration/postrun/testdata/bbi_summary/aa_golden_files/example2_itsimp.golden.json similarity index 100% rename from integration/testdata/bbi_summary/aa_golden_files/example2_itsimp.golden.json rename to integration/postrun/testdata/bbi_summary/aa_golden_files/example2_itsimp.golden.json diff --git a/integration/testdata/bbi_summary/aa_golden_files/example2_itsimp.golden.txt b/integration/postrun/testdata/bbi_summary/aa_golden_files/example2_itsimp.golden.txt similarity index 100% rename from integration/testdata/bbi_summary/aa_golden_files/example2_itsimp.golden.txt rename to integration/postrun/testdata/bbi_summary/aa_golden_files/example2_itsimp.golden.txt diff --git a/integration/testdata/bbi_summary/aa_golden_files/example2_saemimp.golden.json b/integration/postrun/testdata/bbi_summary/aa_golden_files/example2_saemimp.golden.json similarity index 100% rename from integration/testdata/bbi_summary/aa_golden_files/example2_saemimp.golden.json rename to integration/postrun/testdata/bbi_summary/aa_golden_files/example2_saemimp.golden.json diff --git a/integration/testdata/bbi_summary/aa_golden_files/example2_saemimp.golden.txt b/integration/postrun/testdata/bbi_summary/aa_golden_files/example2_saemimp.golden.txt similarity index 100% rename from integration/testdata/bbi_summary/aa_golden_files/example2_saemimp.golden.txt rename to integration/postrun/testdata/bbi_summary/aa_golden_files/example2_saemimp.golden.txt diff --git a/integration/testdata/bbi_summary/aa_golden_files/iovmm.golden.json b/integration/postrun/testdata/bbi_summary/aa_golden_files/iovmm.golden.json similarity index 100% rename from integration/testdata/bbi_summary/aa_golden_files/iovmm.golden.json rename to integration/postrun/testdata/bbi_summary/aa_golden_files/iovmm.golden.json diff --git a/integration/testdata/bbi_summary/aa_golden_files/iovmm.golden.txt b/integration/postrun/testdata/bbi_summary/aa_golden_files/iovmm.golden.txt similarity index 100% rename from integration/testdata/bbi_summary/aa_golden_files/iovmm.golden.txt rename to integration/postrun/testdata/bbi_summary/aa_golden_files/iovmm.golden.txt diff --git a/integration/testdata/bbi_summary/aa_golden_files/multiple-models-error.golden.json b/integration/postrun/testdata/bbi_summary/aa_golden_files/multiple-models-error.golden.json similarity index 100% rename from integration/testdata/bbi_summary/aa_golden_files/multiple-models-error.golden.json rename to integration/postrun/testdata/bbi_summary/aa_golden_files/multiple-models-error.golden.json diff --git a/integration/testdata/bbi_summary/aa_golden_files/multiple-models.golden.json b/integration/postrun/testdata/bbi_summary/aa_golden_files/multiple-models.golden.json similarity index 100% rename from integration/testdata/bbi_summary/aa_golden_files/multiple-models.golden.json rename to integration/postrun/testdata/bbi_summary/aa_golden_files/multiple-models.golden.json diff --git a/integration/testdata/bbi_summary/aa_golden_files/multiple-models.golden.txt b/integration/postrun/testdata/bbi_summary/aa_golden_files/multiple-models.golden.txt similarity index 100% rename from integration/testdata/bbi_summary/aa_golden_files/multiple-models.golden.txt rename to integration/postrun/testdata/bbi_summary/aa_golden_files/multiple-models.golden.txt diff --git a/integration/testdata/bbi_summary/aa_golden_files/onlysim.golden.json b/integration/postrun/testdata/bbi_summary/aa_golden_files/onlysim.golden.json similarity index 100% rename from integration/testdata/bbi_summary/aa_golden_files/onlysim.golden.json rename to integration/postrun/testdata/bbi_summary/aa_golden_files/onlysim.golden.json diff --git a/integration/testdata/bbi_summary/aa_golden_files/onlysim.golden.txt b/integration/postrun/testdata/bbi_summary/aa_golden_files/onlysim.golden.txt similarity index 100% rename from integration/testdata/bbi_summary/aa_golden_files/onlysim.golden.txt rename to integration/postrun/testdata/bbi_summary/aa_golden_files/onlysim.golden.txt diff --git a/integration/testdata/bbi_summary/acop-incomplete/acop-incomplete.cor b/integration/postrun/testdata/bbi_summary/acop-incomplete/acop-incomplete.cor similarity index 100% rename from integration/testdata/bbi_summary/acop-incomplete/acop-incomplete.cor rename to integration/postrun/testdata/bbi_summary/acop-incomplete/acop-incomplete.cor diff --git a/integration/testdata/bbi_summary/acop-incomplete/acop-incomplete.cov b/integration/postrun/testdata/bbi_summary/acop-incomplete/acop-incomplete.cov similarity index 100% rename from integration/testdata/bbi_summary/acop-incomplete/acop-incomplete.cov rename to integration/postrun/testdata/bbi_summary/acop-incomplete/acop-incomplete.cov diff --git a/integration/testdata/bbi_summary/acop-incomplete/acop-incomplete.cpu b/integration/postrun/testdata/bbi_summary/acop-incomplete/acop-incomplete.cpu similarity index 100% rename from integration/testdata/bbi_summary/acop-incomplete/acop-incomplete.cpu rename to integration/postrun/testdata/bbi_summary/acop-incomplete/acop-incomplete.cpu diff --git a/integration/testdata/bbi_summary/acop-incomplete/acop-incomplete.ext b/integration/postrun/testdata/bbi_summary/acop-incomplete/acop-incomplete.ext similarity index 100% rename from integration/testdata/bbi_summary/acop-incomplete/acop-incomplete.ext rename to integration/postrun/testdata/bbi_summary/acop-incomplete/acop-incomplete.ext diff --git a/integration/testdata/bbi_summary/acop-incomplete/acop-incomplete.grd b/integration/postrun/testdata/bbi_summary/acop-incomplete/acop-incomplete.grd similarity index 100% rename from integration/testdata/bbi_summary/acop-incomplete/acop-incomplete.grd rename to integration/postrun/testdata/bbi_summary/acop-incomplete/acop-incomplete.grd diff --git a/integration/testdata/bbi_summary/acop-incomplete/acop-incomplete.lst b/integration/postrun/testdata/bbi_summary/acop-incomplete/acop-incomplete.lst similarity index 100% rename from integration/testdata/bbi_summary/acop-incomplete/acop-incomplete.lst rename to integration/postrun/testdata/bbi_summary/acop-incomplete/acop-incomplete.lst diff --git a/integration/testdata/bbi_summary/acop-incomplete/acop-incomplete.shk b/integration/postrun/testdata/bbi_summary/acop-incomplete/acop-incomplete.shk similarity index 100% rename from integration/testdata/bbi_summary/acop-incomplete/acop-incomplete.shk rename to integration/postrun/testdata/bbi_summary/acop-incomplete/acop-incomplete.shk diff --git a/integration/testdata/bbi_summary/acop-iov.mod b/integration/postrun/testdata/bbi_summary/acop-iov.mod similarity index 100% rename from integration/testdata/bbi_summary/acop-iov.mod rename to integration/postrun/testdata/bbi_summary/acop-iov.mod diff --git a/integration/testdata/bbi_summary/acop-iov/acop-iov.cpu b/integration/postrun/testdata/bbi_summary/acop-iov/acop-iov.cpu similarity index 100% rename from integration/testdata/bbi_summary/acop-iov/acop-iov.cpu rename to integration/postrun/testdata/bbi_summary/acop-iov/acop-iov.cpu diff --git a/integration/testdata/bbi_summary/acop-iov/acop-iov.ext b/integration/postrun/testdata/bbi_summary/acop-iov/acop-iov.ext similarity index 100% rename from integration/testdata/bbi_summary/acop-iov/acop-iov.ext rename to integration/postrun/testdata/bbi_summary/acop-iov/acop-iov.ext diff --git a/integration/testdata/bbi_summary/acop-iov/acop-iov.grd b/integration/postrun/testdata/bbi_summary/acop-iov/acop-iov.grd similarity index 100% rename from integration/testdata/bbi_summary/acop-iov/acop-iov.grd rename to integration/postrun/testdata/bbi_summary/acop-iov/acop-iov.grd diff --git a/integration/testdata/bbi_summary/acop-iov/acop-iov.lst b/integration/postrun/testdata/bbi_summary/acop-iov/acop-iov.lst similarity index 100% rename from integration/testdata/bbi_summary/acop-iov/acop-iov.lst rename to integration/postrun/testdata/bbi_summary/acop-iov/acop-iov.lst diff --git a/integration/testdata/bbi_summary/acop-iov/acop-iov.mod b/integration/postrun/testdata/bbi_summary/acop-iov/acop-iov.mod similarity index 100% rename from integration/testdata/bbi_summary/acop-iov/acop-iov.mod rename to integration/postrun/testdata/bbi_summary/acop-iov/acop-iov.mod diff --git a/integration/testdata/bbi_summary/acop-iov/acop-iov.shk b/integration/postrun/testdata/bbi_summary/acop-iov/acop-iov.shk similarity index 100% rename from integration/testdata/bbi_summary/acop-iov/acop-iov.shk rename to integration/postrun/testdata/bbi_summary/acop-iov/acop-iov.shk diff --git a/integration/testdata/bbi_summary/acop-nan/acop-nan.cor b/integration/postrun/testdata/bbi_summary/acop-nan/acop-nan.cor similarity index 100% rename from integration/testdata/bbi_summary/acop-nan/acop-nan.cor rename to integration/postrun/testdata/bbi_summary/acop-nan/acop-nan.cor diff --git a/integration/testdata/bbi_summary/acop-nan/acop-nan.cov b/integration/postrun/testdata/bbi_summary/acop-nan/acop-nan.cov similarity index 100% rename from integration/testdata/bbi_summary/acop-nan/acop-nan.cov rename to integration/postrun/testdata/bbi_summary/acop-nan/acop-nan.cov diff --git a/integration/testdata/bbi_summary/acop-nan/acop-nan.cpu b/integration/postrun/testdata/bbi_summary/acop-nan/acop-nan.cpu similarity index 100% rename from integration/testdata/bbi_summary/acop-nan/acop-nan.cpu rename to integration/postrun/testdata/bbi_summary/acop-nan/acop-nan.cpu diff --git a/integration/testdata/bbi_summary/acop-nan/acop-nan.ext b/integration/postrun/testdata/bbi_summary/acop-nan/acop-nan.ext similarity index 100% rename from integration/testdata/bbi_summary/acop-nan/acop-nan.ext rename to integration/postrun/testdata/bbi_summary/acop-nan/acop-nan.ext diff --git a/integration/testdata/bbi_summary/acop-nan/acop-nan.grd b/integration/postrun/testdata/bbi_summary/acop-nan/acop-nan.grd similarity index 100% rename from integration/testdata/bbi_summary/acop-nan/acop-nan.grd rename to integration/postrun/testdata/bbi_summary/acop-nan/acop-nan.grd diff --git a/integration/testdata/bbi_summary/acop-nan/acop-nan.lst b/integration/postrun/testdata/bbi_summary/acop-nan/acop-nan.lst similarity index 100% rename from integration/testdata/bbi_summary/acop-nan/acop-nan.lst rename to integration/postrun/testdata/bbi_summary/acop-nan/acop-nan.lst diff --git a/integration/testdata/bbi_summary/acop-nan/acop-nan.shk b/integration/postrun/testdata/bbi_summary/acop-nan/acop-nan.shk similarity index 100% rename from integration/testdata/bbi_summary/acop-nan/acop-nan.shk rename to integration/postrun/testdata/bbi_summary/acop-nan/acop-nan.shk diff --git a/integration/testdata/bbi_summary/acop.ctl b/integration/postrun/testdata/bbi_summary/acop.ctl similarity index 100% rename from integration/testdata/bbi_summary/acop.ctl rename to integration/postrun/testdata/bbi_summary/acop.ctl diff --git a/integration/testdata/bbi_summary/acop/acop.cor b/integration/postrun/testdata/bbi_summary/acop/acop.cor similarity index 100% rename from integration/testdata/bbi_summary/acop/acop.cor rename to integration/postrun/testdata/bbi_summary/acop/acop.cor diff --git a/integration/testdata/bbi_summary/acop/acop.cov b/integration/postrun/testdata/bbi_summary/acop/acop.cov similarity index 100% rename from integration/testdata/bbi_summary/acop/acop.cov rename to integration/postrun/testdata/bbi_summary/acop/acop.cov diff --git a/integration/testdata/bbi_summary/acop/acop.cpu b/integration/postrun/testdata/bbi_summary/acop/acop.cpu similarity index 100% rename from integration/testdata/bbi_summary/acop/acop.cpu rename to integration/postrun/testdata/bbi_summary/acop/acop.cpu diff --git a/integration/testdata/bbi_summary/acop/acop.ext b/integration/postrun/testdata/bbi_summary/acop/acop.ext similarity index 100% rename from integration/testdata/bbi_summary/acop/acop.ext rename to integration/postrun/testdata/bbi_summary/acop/acop.ext diff --git a/integration/testdata/bbi_summary/acop/acop.grd b/integration/postrun/testdata/bbi_summary/acop/acop.grd similarity index 100% rename from integration/testdata/bbi_summary/acop/acop.grd rename to integration/postrun/testdata/bbi_summary/acop/acop.grd diff --git a/integration/testdata/bbi_summary/acop/acop.lst b/integration/postrun/testdata/bbi_summary/acop/acop.lst similarity index 100% rename from integration/testdata/bbi_summary/acop/acop.lst rename to integration/postrun/testdata/bbi_summary/acop/acop.lst diff --git a/integration/testdata/bbi_summary/acop/acop.shk b/integration/postrun/testdata/bbi_summary/acop/acop.shk similarity index 100% rename from integration/testdata/bbi_summary/acop/acop.shk rename to integration/postrun/testdata/bbi_summary/acop/acop.shk diff --git a/integration/testdata/bbi_summary/acop_no_grd/acop_no_grd.cpu b/integration/postrun/testdata/bbi_summary/acop_no_grd/acop_no_grd.cpu similarity index 100% rename from integration/testdata/bbi_summary/acop_no_grd/acop_no_grd.cpu rename to integration/postrun/testdata/bbi_summary/acop_no_grd/acop_no_grd.cpu diff --git a/integration/testdata/bbi_summary/acop_no_grd/acop_no_grd.ext b/integration/postrun/testdata/bbi_summary/acop_no_grd/acop_no_grd.ext similarity index 100% rename from integration/testdata/bbi_summary/acop_no_grd/acop_no_grd.ext rename to integration/postrun/testdata/bbi_summary/acop_no_grd/acop_no_grd.ext diff --git a/integration/testdata/bbi_summary/acop_no_grd/acop_no_grd.lst b/integration/postrun/testdata/bbi_summary/acop_no_grd/acop_no_grd.lst similarity index 100% rename from integration/testdata/bbi_summary/acop_no_grd/acop_no_grd.lst rename to integration/postrun/testdata/bbi_summary/acop_no_grd/acop_no_grd.lst diff --git a/integration/testdata/bbi_summary/acop_no_grd/acop_no_grd.shk b/integration/postrun/testdata/bbi_summary/acop_no_grd/acop_no_grd.shk similarity index 100% rename from integration/testdata/bbi_summary/acop_no_grd/acop_no_grd.shk rename to integration/postrun/testdata/bbi_summary/acop_no_grd/acop_no_grd.shk diff --git a/integration/testdata/bbi_summary/chain/chain.ext b/integration/postrun/testdata/bbi_summary/chain/chain.ext similarity index 100% rename from integration/testdata/bbi_summary/chain/chain.ext rename to integration/postrun/testdata/bbi_summary/chain/chain.ext diff --git a/integration/testdata/bbi_summary/chain/chain.lst b/integration/postrun/testdata/bbi_summary/chain/chain.lst similarity index 100% rename from integration/testdata/bbi_summary/chain/chain.lst rename to integration/postrun/testdata/bbi_summary/chain/chain.lst diff --git a/integration/testdata/bbi_summary/example2_bayes.ctl b/integration/postrun/testdata/bbi_summary/example2_bayes.ctl similarity index 100% rename from integration/testdata/bbi_summary/example2_bayes.ctl rename to integration/postrun/testdata/bbi_summary/example2_bayes.ctl diff --git a/integration/testdata/bbi_summary/example2_bayes/.gitignore b/integration/postrun/testdata/bbi_summary/example2_bayes/.gitignore similarity index 100% rename from integration/testdata/bbi_summary/example2_bayes/.gitignore rename to integration/postrun/testdata/bbi_summary/example2_bayes/.gitignore diff --git a/integration/testdata/bbi_summary/example2_bayes/example2_bayes.cor b/integration/postrun/testdata/bbi_summary/example2_bayes/example2_bayes.cor similarity index 100% rename from integration/testdata/bbi_summary/example2_bayes/example2_bayes.cor rename to integration/postrun/testdata/bbi_summary/example2_bayes/example2_bayes.cor diff --git a/integration/testdata/bbi_summary/example2_bayes/example2_bayes.cov b/integration/postrun/testdata/bbi_summary/example2_bayes/example2_bayes.cov similarity index 100% rename from integration/testdata/bbi_summary/example2_bayes/example2_bayes.cov rename to integration/postrun/testdata/bbi_summary/example2_bayes/example2_bayes.cov diff --git a/integration/testdata/bbi_summary/example2_bayes/example2_bayes.cpu b/integration/postrun/testdata/bbi_summary/example2_bayes/example2_bayes.cpu similarity index 100% rename from integration/testdata/bbi_summary/example2_bayes/example2_bayes.cpu rename to integration/postrun/testdata/bbi_summary/example2_bayes/example2_bayes.cpu diff --git a/integration/testdata/bbi_summary/example2_bayes/example2_bayes.ctl b/integration/postrun/testdata/bbi_summary/example2_bayes/example2_bayes.ctl similarity index 100% rename from integration/testdata/bbi_summary/example2_bayes/example2_bayes.ctl rename to integration/postrun/testdata/bbi_summary/example2_bayes/example2_bayes.ctl diff --git a/integration/testdata/bbi_summary/example2_bayes/example2_bayes.ext b/integration/postrun/testdata/bbi_summary/example2_bayes/example2_bayes.ext similarity index 100% rename from integration/testdata/bbi_summary/example2_bayes/example2_bayes.ext rename to integration/postrun/testdata/bbi_summary/example2_bayes/example2_bayes.ext diff --git a/integration/testdata/bbi_summary/example2_bayes/example2_bayes.lst b/integration/postrun/testdata/bbi_summary/example2_bayes/example2_bayes.lst similarity index 100% rename from integration/testdata/bbi_summary/example2_bayes/example2_bayes.lst rename to integration/postrun/testdata/bbi_summary/example2_bayes/example2_bayes.lst diff --git a/integration/testdata/bbi_summary/example2_bayes/example2_bayes.shk b/integration/postrun/testdata/bbi_summary/example2_bayes/example2_bayes.shk similarity index 100% rename from integration/testdata/bbi_summary/example2_bayes/example2_bayes.shk rename to integration/postrun/testdata/bbi_summary/example2_bayes/example2_bayes.shk diff --git a/integration/testdata/bbi_summary/example2_itsimp.ctl b/integration/postrun/testdata/bbi_summary/example2_itsimp.ctl similarity index 100% rename from integration/testdata/bbi_summary/example2_itsimp.ctl rename to integration/postrun/testdata/bbi_summary/example2_itsimp.ctl diff --git a/integration/testdata/bbi_summary/example2_itsimp/.gitignore b/integration/postrun/testdata/bbi_summary/example2_itsimp/.gitignore similarity index 100% rename from integration/testdata/bbi_summary/example2_itsimp/.gitignore rename to integration/postrun/testdata/bbi_summary/example2_itsimp/.gitignore diff --git a/integration/testdata/bbi_summary/example2_itsimp/example2_itsimp.cor b/integration/postrun/testdata/bbi_summary/example2_itsimp/example2_itsimp.cor similarity index 100% rename from integration/testdata/bbi_summary/example2_itsimp/example2_itsimp.cor rename to integration/postrun/testdata/bbi_summary/example2_itsimp/example2_itsimp.cor diff --git a/integration/testdata/bbi_summary/example2_itsimp/example2_itsimp.cov b/integration/postrun/testdata/bbi_summary/example2_itsimp/example2_itsimp.cov similarity index 100% rename from integration/testdata/bbi_summary/example2_itsimp/example2_itsimp.cov rename to integration/postrun/testdata/bbi_summary/example2_itsimp/example2_itsimp.cov diff --git a/integration/testdata/bbi_summary/example2_itsimp/example2_itsimp.cpu b/integration/postrun/testdata/bbi_summary/example2_itsimp/example2_itsimp.cpu similarity index 100% rename from integration/testdata/bbi_summary/example2_itsimp/example2_itsimp.cpu rename to integration/postrun/testdata/bbi_summary/example2_itsimp/example2_itsimp.cpu diff --git a/integration/testdata/bbi_summary/example2_itsimp/example2_itsimp.ctl b/integration/postrun/testdata/bbi_summary/example2_itsimp/example2_itsimp.ctl similarity index 100% rename from integration/testdata/bbi_summary/example2_itsimp/example2_itsimp.ctl rename to integration/postrun/testdata/bbi_summary/example2_itsimp/example2_itsimp.ctl diff --git a/integration/testdata/bbi_summary/example2_itsimp/example2_itsimp.ext b/integration/postrun/testdata/bbi_summary/example2_itsimp/example2_itsimp.ext similarity index 100% rename from integration/testdata/bbi_summary/example2_itsimp/example2_itsimp.ext rename to integration/postrun/testdata/bbi_summary/example2_itsimp/example2_itsimp.ext diff --git a/integration/testdata/bbi_summary/example2_itsimp/example2_itsimp.lst b/integration/postrun/testdata/bbi_summary/example2_itsimp/example2_itsimp.lst similarity index 100% rename from integration/testdata/bbi_summary/example2_itsimp/example2_itsimp.lst rename to integration/postrun/testdata/bbi_summary/example2_itsimp/example2_itsimp.lst diff --git a/integration/testdata/bbi_summary/example2_itsimp/example2_itsimp.shk b/integration/postrun/testdata/bbi_summary/example2_itsimp/example2_itsimp.shk similarity index 100% rename from integration/testdata/bbi_summary/example2_itsimp/example2_itsimp.shk rename to integration/postrun/testdata/bbi_summary/example2_itsimp/example2_itsimp.shk diff --git a/integration/testdata/bbi_summary/example2_saemimp.ctl b/integration/postrun/testdata/bbi_summary/example2_saemimp.ctl similarity index 100% rename from integration/testdata/bbi_summary/example2_saemimp.ctl rename to integration/postrun/testdata/bbi_summary/example2_saemimp.ctl diff --git a/integration/testdata/bbi_summary/example2_saemimp/.gitignore b/integration/postrun/testdata/bbi_summary/example2_saemimp/.gitignore similarity index 100% rename from integration/testdata/bbi_summary/example2_saemimp/.gitignore rename to integration/postrun/testdata/bbi_summary/example2_saemimp/.gitignore diff --git a/integration/testdata/bbi_summary/example2_saemimp/example2_saemimp.cor b/integration/postrun/testdata/bbi_summary/example2_saemimp/example2_saemimp.cor similarity index 100% rename from integration/testdata/bbi_summary/example2_saemimp/example2_saemimp.cor rename to integration/postrun/testdata/bbi_summary/example2_saemimp/example2_saemimp.cor diff --git a/integration/testdata/bbi_summary/example2_saemimp/example2_saemimp.cov b/integration/postrun/testdata/bbi_summary/example2_saemimp/example2_saemimp.cov similarity index 100% rename from integration/testdata/bbi_summary/example2_saemimp/example2_saemimp.cov rename to integration/postrun/testdata/bbi_summary/example2_saemimp/example2_saemimp.cov diff --git a/integration/testdata/bbi_summary/example2_saemimp/example2_saemimp.cpu b/integration/postrun/testdata/bbi_summary/example2_saemimp/example2_saemimp.cpu similarity index 100% rename from integration/testdata/bbi_summary/example2_saemimp/example2_saemimp.cpu rename to integration/postrun/testdata/bbi_summary/example2_saemimp/example2_saemimp.cpu diff --git a/integration/testdata/bbi_summary/example2_saemimp/example2_saemimp.ctl b/integration/postrun/testdata/bbi_summary/example2_saemimp/example2_saemimp.ctl similarity index 100% rename from integration/testdata/bbi_summary/example2_saemimp/example2_saemimp.ctl rename to integration/postrun/testdata/bbi_summary/example2_saemimp/example2_saemimp.ctl diff --git a/integration/testdata/bbi_summary/example2_saemimp/example2_saemimp.ext b/integration/postrun/testdata/bbi_summary/example2_saemimp/example2_saemimp.ext similarity index 100% rename from integration/testdata/bbi_summary/example2_saemimp/example2_saemimp.ext rename to integration/postrun/testdata/bbi_summary/example2_saemimp/example2_saemimp.ext diff --git a/integration/testdata/bbi_summary/example2_saemimp/example2_saemimp.lst b/integration/postrun/testdata/bbi_summary/example2_saemimp/example2_saemimp.lst similarity index 100% rename from integration/testdata/bbi_summary/example2_saemimp/example2_saemimp.lst rename to integration/postrun/testdata/bbi_summary/example2_saemimp/example2_saemimp.lst diff --git a/integration/testdata/bbi_summary/example2_saemimp/example2_saemimp.shk b/integration/postrun/testdata/bbi_summary/example2_saemimp/example2_saemimp.shk similarity index 100% rename from integration/testdata/bbi_summary/example2_saemimp/example2_saemimp.shk rename to integration/postrun/testdata/bbi_summary/example2_saemimp/example2_saemimp.shk diff --git a/integration/testdata/bbi_summary/example2_saemimp/saem.ext b/integration/postrun/testdata/bbi_summary/example2_saemimp/saem.ext similarity index 100% rename from integration/testdata/bbi_summary/example2_saemimp/saem.ext rename to integration/postrun/testdata/bbi_summary/example2_saemimp/saem.ext diff --git a/integration/testdata/bbi_summary/iovmm.mod b/integration/postrun/testdata/bbi_summary/iovmm.mod similarity index 100% rename from integration/testdata/bbi_summary/iovmm.mod rename to integration/postrun/testdata/bbi_summary/iovmm.mod diff --git a/integration/testdata/bbi_summary/iovmm/.gitignore b/integration/postrun/testdata/bbi_summary/iovmm/.gitignore similarity index 100% rename from integration/testdata/bbi_summary/iovmm/.gitignore rename to integration/postrun/testdata/bbi_summary/iovmm/.gitignore diff --git a/integration/testdata/bbi_summary/iovmm/iovmm.cpu b/integration/postrun/testdata/bbi_summary/iovmm/iovmm.cpu similarity index 100% rename from integration/testdata/bbi_summary/iovmm/iovmm.cpu rename to integration/postrun/testdata/bbi_summary/iovmm/iovmm.cpu diff --git a/integration/testdata/bbi_summary/iovmm/iovmm.ext b/integration/postrun/testdata/bbi_summary/iovmm/iovmm.ext similarity index 100% rename from integration/testdata/bbi_summary/iovmm/iovmm.ext rename to integration/postrun/testdata/bbi_summary/iovmm/iovmm.ext diff --git a/integration/testdata/bbi_summary/iovmm/iovmm.grd b/integration/postrun/testdata/bbi_summary/iovmm/iovmm.grd similarity index 100% rename from integration/testdata/bbi_summary/iovmm/iovmm.grd rename to integration/postrun/testdata/bbi_summary/iovmm/iovmm.grd diff --git a/integration/testdata/bbi_summary/iovmm/iovmm.lst b/integration/postrun/testdata/bbi_summary/iovmm/iovmm.lst similarity index 100% rename from integration/testdata/bbi_summary/iovmm/iovmm.lst rename to integration/postrun/testdata/bbi_summary/iovmm/iovmm.lst diff --git a/integration/testdata/bbi_summary/iovmm/iovmm.mod b/integration/postrun/testdata/bbi_summary/iovmm/iovmm.mod similarity index 100% rename from integration/testdata/bbi_summary/iovmm/iovmm.mod rename to integration/postrun/testdata/bbi_summary/iovmm/iovmm.mod diff --git a/integration/testdata/bbi_summary/iovmm/iovmm.shk b/integration/postrun/testdata/bbi_summary/iovmm/iovmm.shk similarity index 100% rename from integration/testdata/bbi_summary/iovmm/iovmm.shk rename to integration/postrun/testdata/bbi_summary/iovmm/iovmm.shk diff --git a/integration/testdata/bbi_summary/onlysim/onlysim.lst b/integration/postrun/testdata/bbi_summary/onlysim/onlysim.lst similarity index 100% rename from integration/testdata/bbi_summary/onlysim/onlysim.lst rename to integration/postrun/testdata/bbi_summary/onlysim/onlysim.lst From 1449d16a3ea86f617f422416501c3b1579943c3b Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Fri, 9 Aug 2024 11:19:35 -0400 Subject: [PATCH 3/3] ci: switch to GitHub Actions For bbi testing with Drone, we relied on a self-hosted server with NONMEM in order to run the full test suite. At least for now, the plan isn't to mimic that setup with GitHub Actions. Instead set up GitHub Actions to run all the tests that don't require NONMEM, and rely on the full test suite being executed outside of CI. --- .drone.yml | 171 ------------------------------------ .github/workflows/lint.yml | 33 +++++++ .github/workflows/main.yaml | 67 ++++++++++++++ 3 files changed, 100 insertions(+), 171 deletions(-) delete mode 100644 .drone.yml create mode 100644 .github/workflows/lint.yml create mode 100644 .github/workflows/main.yaml diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index 4d63d317..00000000 --- a/.drone.yml +++ /dev/null @@ -1,171 +0,0 @@ -kind: pipeline -type: docker -name: lint - -steps: - - name: lint - image: golang:1.17 - commands: - - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.47.2 - - golangci-lint run ---- -kind: pipeline -type: exec -name: testing - -platform: - os: linux - arch: amd64 - -workspace: - path: /tmp/drone - -steps: - - name: Build bbi - commands: - - mkdir -p /tmp/${DRONE_BUILD_NUMBER} ; git rev-parse HEAD > /tmp/${DRONE_BUILD_NUMBER}/bbi_hash - - # this is a hack around the current design; will clean up after passing a test or two - - go build -o bbi cmd/bbi/main.go - - ./bbi version - - name: Copy commit hashes to s3 - commands: - - printf "[\n" > /tmp/${DRONE_BUILD_NUMBER}/commits.json - - printf " {\"repo\":\"metrumresearchgroup/bbi\", \"commit\":\"$(cat /tmp/${DRONE_BUILD_NUMBER}/bbi_hash)\"},\n" >> /tmp/${DRONE_BUILD_NUMBER}/commits.json - - printf "]\n" >> /tmp/${DRONE_BUILD_NUMBER}/commits.json - - aws s3 cp /tmp/${DRONE_BUILD_NUMBER}/commits.json s3://mrg-validation/bbi/${DRONE_BUILD_NUMBER}/commits.json - - name: Copy summary info for mrgvalidate to s3 - commands: - - | - cat > /tmp/${DRONE_BUILD_NUMBER}/summary.json <>$GITHUB_PATH + - name: Run golangci-lint + shell: bash + run: | + command -v golangci-lint + golangci-lint run --out-format=github-actions diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml new file mode 100644 index 00000000..96ae85ba --- /dev/null +++ b/.github/workflows/main.yaml @@ -0,0 +1,67 @@ +name: CI +on: + push: + branches: + - main + - 'scratch/**' + tags: + - 'v*' + pull_request: + +jobs: + check: + runs-on: ${{ matrix.config.os }} + name: ${{ matrix.config.os }} (${{ matrix.config.go }}) + strategy: + fail-fast: false + matrix: + config: + - os: ubuntu-20.04 + go: 1.21.x + - os: ubuntu-latest + go: stable + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: ${{ matrix.config.go }} + - name: Unit tests + shell: bash + run: go list ./... | grep -v integration | xargs go test + - name: Build bbi + shell: bash + run: | + version=$(git rev-parse 'HEAD^{tree}') + bin=$(mktemp -d) + go build -o "$bin/bbi" \ + -ldflags "-X github.com/metrumresearchgroup/bbi/cmd.VERSION=$version" \ + cmd/bbi/main.go + echo "$bin" >>$GITHUB_PATH + - name: Integration tests (postrun) + shell: bash + run: | + bbi version + go test ./integration/postrun + release: + if: github.ref_type == 'tag' + name: Make release + needs: check + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: actions/setup-go@v5 + with: + go-version: stable + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v6 + with: + distribution: goreleaser + version: '~> v2' + args: release --clean + workdir: cmd/bbi + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}