Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into ts_h5fl_reg
Browse files Browse the repository at this point in the history
  • Loading branch information
qkoziol committed Feb 6, 2025
2 parents 6247631 + 354994a commit 28f4f91
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM mcr.microsoft.com/devcontainers/base:debian

RUN apt-get update && apt-get -y install --no-install-recommends \
build-essential cmake cmake-curses-gui doxygen git graphviz \
build-essential cmake cmake-curses-gui default-jdk doxygen gfortran git graphviz \
less libtool-bin libyajl-dev mpi-default-dev ninja-build valgrind wget
1 change: 1 addition & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"ms-python.python",
"ms-toolsai.jupyter",
"ms-vscode.cpptools",
"ms-vscode.cpptools-extension-pack",
"ms-vscode.live-server",
"ms-vscode-remote.remote-containers",
"ms-azuretools.vscode-docker",
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cmake-ctest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ jobs:
shell: bash

- name: Sign files with Trusted Signing
uses: azure/[email protected].0
uses: azure/[email protected].1
with:
azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}
azure-client-id: ${{ secrets.AZURE_CLIENT_ID }}
Expand Down Expand Up @@ -695,7 +695,7 @@ jobs:
shell: pwsh

- name: Sign files with Trusted Signing (Windows_intel)
uses: azure/[email protected].0
uses: azure/[email protected].1
with:
azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}
azure-client-id: ${{ secrets.AZURE_CLIENT_ID }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ jobs:
- name: PreRelease tag
id: create_prerelease
if: ${{ (inputs.use_environ == 'snapshots') }}
uses: softprops/action-gh-release@01570a1f39cb168c169c802c3bceb9e93fb10974 # v2.1.0
uses: softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # v2.2.1
with:
tag_name: "${{ inputs.use_tag }}"
prerelease: true
Expand Down Expand Up @@ -249,7 +249,7 @@ jobs:
- name: Release tag
id: create_release
if: ${{ (inputs.use_environ == 'release') }}
uses: softprops/action-gh-release@01570a1f39cb168c169c802c3bceb9e93fb10974 # v2.1.0
uses: softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # v2.2.1
with:
tag_name: "${{ inputs.use_tag }}"
prerelease: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,6 @@ jobs:

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@f09c1c0a94de965c15400f5634aa42fac8fb8f88 # v3.27.5
uses: github/codeql-action/upload-sarif@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8
with:
sarif_file: results.sarif
2 changes: 1 addition & 1 deletion test/h5test.h
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ H5TEST_DLLVAR MPI_Info h5_io_info_g; /* MPI INFO object for IO */

/* Macros for the different TestExpress levels for expediting tests */
#define H5_TEST_EXPRESS_EXHAUSTIVE 0 /** Exhaustive run; tests should take as long as necessary */
#define H5_TEST_EXPRESS_FULL 1 /** Full run; tests should take no more than 30 minutes */
#define H5_TEST_EXPRESS_FULL 1 /** Full run; tests should take no more than 20 minutes */
#define H5_TEST_EXPRESS_QUICK 2 /** Quick run; tests should take no more than 10 minutes */
#define H5_TEST_EXPRESS_SMOKE_TEST 3 /** Smoke test; tests should take no more than 1 minute */

Expand Down
62 changes: 36 additions & 26 deletions test/testframe.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,12 @@ TestInit(const char *ProgName, void (*TestPrivateUsage)(FILE *stream),
/* Initialize value for TestExpress functionality */
h5_get_testexpress();

/* Enable alarm timer for test program once TestExpress setting
* has been determined
*/
if (TestAlarmOn() < 0)
MESSAGE(5, ("Couldn't enable test alarm timer\n"));

/* Record the program name and private routines if provided. */
TestProgName = ProgName;
if (NULL != TestPrivateUsage)
Expand Down Expand Up @@ -461,10 +467,6 @@ PerformTests(void)
MESSAGE(2, ("Testing -- %s (%s) \n", TestArray[Loop].Description, TestArray[Loop].Name));
MESSAGE(5, ("===============================================\n"));

if (TestAlarmOn() < 0)
MESSAGE(5, ("Couldn't enable test alarm timer for test -- %s (%s) \n",
TestArray[Loop].Description, TestArray[Loop].Name));

if (TestArray[Loop].TestSetupFunc)
TestArray[Loop].TestSetupFunc(TestArray[Loop].TestParameters);

Expand All @@ -473,8 +475,6 @@ PerformTests(void)
if (TestArray[Loop].TestCleanupFunc)
TestArray[Loop].TestCleanupFunc(TestArray[Loop].TestParameters);

TestAlarmOff();

TestArray[Loop].TestNumErrors = TestNumErrs_g - old_num_errs;

MESSAGE(5, ("===============================================\n"));
Expand Down Expand Up @@ -573,6 +573,8 @@ TestShutdown(void)

free(TestArray);

TestAlarmOff();

return SUCCEED;
}

Expand Down Expand Up @@ -829,30 +831,38 @@ SetTestMaxNumThreads(int max_num_threads)
herr_t
TestAlarmOn(void)
{
/* A TestExpress setting of H5_TEST_EXPRESS_EXHAUSTIVE should allow
* tests to run for as long as necessary, so avoid enabling an
* alarm-style timer here that would, by default, kill the test.
*/
if (GetTestExpress() == H5_TEST_EXPRESS_EXHAUSTIVE)
return SUCCEED;
#ifdef H5_HAVE_ALARM
char *env_val = getenv("HDF5_ALARM_SECONDS"); /* Alarm environment */
unsigned long alarm_sec = H5_ALARM_SEC; /* Number of seconds before alarm goes off */
else {
char *env_val = getenv("HDF5_ALARM_SECONDS"); /* Alarm environment */
unsigned long alarm_sec = H5_ALARM_SEC; /* Number of seconds before alarm goes off */

/* Get the alarm value from the environment variable, if set */
if (env_val != NULL) {
errno = 0;
alarm_sec = strtoul(env_val, NULL, 10);
if (errno != 0) {
if (TestFrameworkProcessID_g == 0)
fprintf(stderr, "%s: error while parsing value (%s) specified for alarm timeout\n", __func__,
env_val);
return FAIL;
}
else if (alarm_sec > (unsigned long)UINT_MAX) {
if (TestFrameworkProcessID_g == 0)
fprintf(stderr, "%s: value (%lu) specified for alarm timeout too large\n", __func__,
alarm_sec);
return FAIL;
/* Get the alarm value from the environment variable, if set */
if (env_val != NULL) {
errno = 0;
alarm_sec = strtoul(env_val, NULL, 10);
if (errno != 0) {
if (TestFrameworkProcessID_g == 0)
fprintf(stderr, "%s: error while parsing value (%s) specified for alarm timeout\n",
__func__, env_val);
return FAIL;
}
else if (alarm_sec > (unsigned long)UINT_MAX) {
if (TestFrameworkProcessID_g == 0)
fprintf(stderr, "%s: value (%lu) specified for alarm timeout too large\n", __func__,
alarm_sec);
return FAIL;
}
}
}

/* Set the number of seconds before alarm goes off */
alarm((unsigned)alarm_sec);
/* Set the number of seconds before alarm goes off */
alarm((unsigned)alarm_sec);
}
#endif

return SUCCEED;
Expand Down

0 comments on commit 28f4f91

Please sign in to comment.