diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6cce6c7..ad37245 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -57,6 +57,7 @@ jobs: - name: Run library test shell: bash run: | + export MY_SANITY_CHECK_DIRECTORY=sanityCheck python test.py --branch="${{ matrix.omc-version }}" --noclean --verbose ${{ matrix.msysEnvironment }} configs/sanityCheck.json - name: Generate HTML results diff --git a/configs/sanityCheck.json b/configs/sanityCheck.json index b701b1d..fb108ec 100644 --- a/configs/sanityCheck.json +++ b/configs/sanityCheck.json @@ -7,7 +7,7 @@ ], "referenceFileExtension": "csv", "referenceFileNameDelimiter": ".", - "referenceFiles": "sanityCheck/ReferenceFiles" + "referenceFiles": "$MY_SANITY_CHECK_DIRECTORY/ReferenceFiles" }, { "library": "MyOtherLibrary", diff --git a/test.py b/test.py index 28b2161..6880ca8 100755 --- a/test.py +++ b/test.py @@ -412,7 +412,7 @@ def testHelloWorld(cmd): if "referenceFiles" in c: c["referenceFilesURL"] = c["referenceFiles"] if isinstance(c["referenceFiles"], (str, bytes)): - m = re.search("^[$][A-Z]+", c["referenceFiles"]) + m = re.search("^[$][A-Z_]+", c["referenceFiles"]) if m: k = m.group(0)[1:] if k not in os.environ: @@ -851,10 +851,14 @@ def expectedExec(c): start_as_time=time.localtime() testRunStartTimeAsEpoch = int(time.time()) # Need translateModel + make + exe... +if n_jobs == 1: + verbose = 10 +else: + verbose = 5 if customTimeout > 0.0: - cmd_res=Parallel(n_jobs=n_jobs, verbose=5)(delayed(runScript)(name, customTimeout, data["ulimitMemory"], runverbose) for (model,lib,libName,name,data) in tests) + cmd_res=Parallel(n_jobs=n_jobs, verbose=verbose)(delayed(runScript)(name, customTimeout, data["ulimitMemory"], runverbose) for (model,lib,libName,name,data) in tests) else: - cmd_res=Parallel(n_jobs=n_jobs, verbose=5)(delayed(runScript)(name, 2*data["ulimitOmc"]+data["ulimitExe"]+25, data["ulimitMemory"], runverbose) for (model,lib,libName,name,data) in tests) + cmd_res=Parallel(n_jobs=n_jobs, verbose=verbose)(delayed(runScript)(name, 2*data["ulimitOmc"]+data["ulimitExe"]+25, data["ulimitMemory"], runverbose) for (model,lib,libName,name,data) in tests) stop=monotonic() print("Execution time: %s" % friendlyStr(stop-start)) assert(stop-start >= 0.0) @@ -1009,16 +1013,24 @@ def cpu_name(): # adrpo: attempt to get the revision of the reference files if possible if conf.get("referenceFiles"): + c = conf.get("referenceFiles") + print("referenceFiles git ... attempting to retrieve info from directory: %s" % c) + sys.stdout.flush() try: - c = conf.get("referenceFiles") gitReferenceFiles = c if isinstance(c, (str, bytes)): - m = re.search("^[$][A-Z]+", c) + print("referenceFiles git ... see if directory has an evironment variable") + sys.stdout.flush() + m = re.search("^[$][A-Z_]+", c) if m: k = m.group(0)[1:] if k not in os.environ: + print("referenceFiles git ... environment variable used in the directory cannot be found in the environment: %s" % k) + sys.stdout.flush() raise Exception("Environment variable %s not defined, but used in JSON config for reference files" % k) gitReferenceFiles = c.replace(m.group(0), os.environ[k]) + print("referenceFiles git ... directory after replacing the environment variable: %s" % gitReferenceFiles) + sys.stdout.flush() sys.stdout.flush() try: gitReferenceFilesURL = check_output_log(["git", "config", "get", "remote.origin.url"], cwd=gitReferenceFiles).decode("utf-8") @@ -1026,8 +1038,12 @@ def cpu_name(): print(str(e)) gitReferenceFilesURL = gitReferenceFiles gitReferenceFilesVersion = check_output_log(["git", "log", '--pretty=
Commit | Date | Author | Summary |
---|---|---|---|
%%h | %%ai | %%an | %%s |