tests: jfjoch_portable_test, quick [portable] checks for the macOS and Windows jobs
A Catch2 executable that builds in the portable configurations (JFJOCH_VIEWER_ONLY / JFJOCH_RUGNUX_ONLY) and links only what those build - JFJochRugnux, JFJochReader, JFJochImageAnalysis, JFJochWriter, JFJochCommon - so it can run on the macOS arm64 and Windows x64 jobs, where the receiver/broker/FPGA/HLS sources are not built and there is no GPU. EXCLUDE_FROM_ALL, so a product build does not pay for it; catch2 is now made available in the portable configure as well (it is EXCLUDE_FROM_ALL too). The cases tagged [portable] cover what depends on the architecture, the compiler or the standard library: bitshuffle/LZ4/zstd, HDF5 read-back (legacy/VDS/integrated, the direct-chunk path), miniCBF/marCCD/SMV header parsing, CBOR, CPU spot finding, azimuthal mapping, Bragg prediction/integration, gemmi MTZ/mmCIF. New in tests/PortableTest.cpp: - a golden FNV-1a hash of two frames of compression_benchmark.h5, decoded from the raw chunk by the hperf and the classic bitshuffle and through the HDF5 filter (x86 hashes affea29c511b6ec2 / e46913009c95a1f1); - a golden hash of a bitshuffle/LZ4 encode (the writer must produce the same bytes everywhere); - the shipped bitshuffle block selector against the classic reference over elem 1/2/4/8 and block tails; - the FFTW indexer, named explicitly, on a synthetic orthorhombic lattice (the existing FFT indexer lattice tests run only under CUDA); - a 4-frame end-to-end rugnux run on the git-LFS rotation dataset (HDF5 via external links, CPU spot finding, indexing, integration); SKIPs when LFS was not pulled. All 45 take ~4 s on Linux (~2 s without the LFS case), CPU-only build. M_PI replaced by PI (common/JFJochMath.h) in the two tagged files that used it, as MSVC does not define M_PI. The CBF gzip test shells out to gzip and is left untagged. CI: build and run jfjoch_portable_test "[portable]" in build-windows (both variants), build-rugnux-windows, build-macos-viewer and build-rugnux-macos, after the build and before packaging. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D1G8gJVAy6gp1K5Dz3NE5C
This commit is contained in:
1 parent
f4f9157cc0
commit
a8c559bf6b
18 files changed
+315
-49
No files matched your search
+16
-16
@@ -608,7 +608,7 @@ TEST_CASE("JFJochReader_GridScan", "[HDF5][Full]") {
|
||||
REQUIRE(H5Fget_obj_count(H5F_OBJ_ALL, H5F_OBJ_ALL) == 0);
|
||||
}
|
||||
|
||||
TEST_CASE("JFJochReader_DataI16", "[HDF5][Full]") {
|
||||
TEST_CASE("JFJochReader_DataI16", "[HDF5][Full][portable]") {
|
||||
DiffractionExperiment x(DetJF(1));
|
||||
|
||||
x.FilePrefix("test09").ImagesPerTrigger(4).OverwriteExistingFiles(true);
|
||||
@@ -774,7 +774,7 @@ TEST_CASE("JFJochReader_DataI16_OldMasterFormat", "[HDF5][Full]") {
|
||||
REQUIRE(H5Fget_obj_count(H5F_OBJ_ALL, H5F_OBJ_ALL) == 0);
|
||||
}
|
||||
|
||||
TEST_CASE("JFJochReader_DataU16", "[HDF5][Full]") {
|
||||
TEST_CASE("JFJochReader_DataU16", "[HDF5][Full][portable]") {
|
||||
DiffractionExperiment x(DetJF(1));
|
||||
|
||||
x.FilePrefix("test10").ImagesPerTrigger(4).OverwriteExistingFiles(true);
|
||||
@@ -846,7 +846,7 @@ TEST_CASE("JFJochReader_DataU16", "[HDF5][Full]") {
|
||||
REQUIRE(H5Fget_obj_count(H5F_OBJ_ALL, H5F_OBJ_ALL) == 0);
|
||||
}
|
||||
|
||||
TEST_CASE("JFJochReader_DataI32", "[HDF5][Full]") {
|
||||
TEST_CASE("JFJochReader_DataI32", "[HDF5][Full][portable]") {
|
||||
DiffractionExperiment x(DetJF(1));
|
||||
|
||||
x.FilePrefix("test11").ImagesPerTrigger(4).OverwriteExistingFiles(true);
|
||||
@@ -913,7 +913,7 @@ TEST_CASE("JFJochReader_DataI32", "[HDF5][Full]") {
|
||||
REQUIRE(H5Fget_obj_count(H5F_OBJ_ALL, H5F_OBJ_ALL) == 0);
|
||||
}
|
||||
|
||||
TEST_CASE("JFJochReader_DataU32", "[HDF5][Full]") {
|
||||
TEST_CASE("JFJochReader_DataU32", "[HDF5][Full][portable]") {
|
||||
DiffractionExperiment x(DetJF(1));
|
||||
|
||||
x.FilePrefix("test12").ImagesPerTrigger(4).OverwriteExistingFiles(true);
|
||||
@@ -1786,7 +1786,7 @@ TEST_CASE("JFJochReader_NXmxIntegrated", "[HDF5][Full]") {
|
||||
REQUIRE(H5Fget_obj_count(H5F_OBJ_ALL, H5F_OBJ_ALL) == 0);
|
||||
}
|
||||
|
||||
TEST_CASE("JFJochReader_GetRawImage_NXmxLegacy", "[HDF5][Full]") {
|
||||
TEST_CASE("JFJochReader_GetRawImage_NXmxLegacy", "[HDF5][Full][portable]") {
|
||||
DiffractionExperiment x(DetJF(1));
|
||||
|
||||
x.FilePrefix("test_read_raw_image").ImagesPerTrigger(4).OverwriteExistingFiles(true);
|
||||
@@ -1906,7 +1906,7 @@ TEST_CASE("JFJochReader_GetRawImage_Concurrent", "[HDF5][Full]") {
|
||||
REQUIRE(H5Fget_obj_count(H5F_OBJ_ALL, H5F_OBJ_ALL) == 0);
|
||||
}
|
||||
|
||||
TEST_CASE("JFJochReader_GetRawImage_VDS", "[HDF5][Full]") {
|
||||
TEST_CASE("JFJochReader_GetRawImage_VDS", "[HDF5][Full][portable]") {
|
||||
DiffractionExperiment x(DetJF(1));
|
||||
|
||||
x.FilePrefix("test_read_raw_image").ImagesPerTrigger(4).OverwriteExistingFiles(true);
|
||||
@@ -1965,7 +1965,7 @@ TEST_CASE("JFJochReader_GetRawImage_VDS", "[HDF5][Full]") {
|
||||
REQUIRE(H5Fget_obj_count(H5F_OBJ_ALL, H5F_OBJ_ALL) == 0);
|
||||
}
|
||||
|
||||
TEST_CASE("JFJochReader_GetRawImage_Integrated", "[HDF5][Full]") {
|
||||
TEST_CASE("JFJochReader_GetRawImage_Integrated", "[HDF5][Full][portable]") {
|
||||
DiffractionExperiment x(DetJF(1));
|
||||
|
||||
x.FilePrefix("test_read_raw_image").ImagesPerTrigger(4).OverwriteExistingFiles(true);
|
||||
@@ -2022,7 +2022,7 @@ TEST_CASE("JFJochReader_GetRawImage_Integrated", "[HDF5][Full]") {
|
||||
REQUIRE(H5Fget_obj_count(H5F_OBJ_ALL, H5F_OBJ_ALL) == 0);
|
||||
}
|
||||
|
||||
TEST_CASE("JFJochReader_HDF5DataSource_Integrated", "[HDF5][Full]") {
|
||||
TEST_CASE("JFJochReader_HDF5DataSource_Integrated", "[HDF5][Full][portable]") {
|
||||
DiffractionExperiment x(DetJF(1));
|
||||
|
||||
x.FilePrefix("source_integrated").ImagesPerTrigger(5).OverwriteExistingFiles(true);
|
||||
@@ -2070,7 +2070,7 @@ TEST_CASE("JFJochReader_HDF5DataSource_Integrated", "[HDF5][Full]") {
|
||||
REQUIRE(H5Fget_obj_count(H5F_OBJ_ALL, H5F_OBJ_ALL) == 0);
|
||||
}
|
||||
|
||||
TEST_CASE("JFJochReader_HDF5DataSource_VDS", "[HDF5][Full]") {
|
||||
TEST_CASE("JFJochReader_HDF5DataSource_VDS", "[HDF5][Full][portable]") {
|
||||
DiffractionExperiment x(DetJF(1));
|
||||
|
||||
x.FilePrefix("source_vds_mapping").ImagesPerTrigger(5).ImagesPerFile(2).OverwriteExistingFiles(true);
|
||||
@@ -2131,7 +2131,7 @@ TEST_CASE("JFJochReader_HDF5DataSource_VDS", "[HDF5][Full]") {
|
||||
REQUIRE(H5Fget_obj_count(H5F_OBJ_ALL, H5F_OBJ_ALL) == 0);
|
||||
}
|
||||
|
||||
TEST_CASE("JFJochReader_HDF5DataSource_Legacy", "[HDF5][Full]") {
|
||||
TEST_CASE("JFJochReader_HDF5DataSource_Legacy", "[HDF5][Full][portable]") {
|
||||
DiffractionExperiment x(DetJF(1));
|
||||
|
||||
x.FilePrefix("source_legacy_mapping").ImagesPerTrigger(5).ImagesPerFile(2).OverwriteExistingFiles(true);
|
||||
@@ -3434,7 +3434,7 @@ TEST_CASE("JFJochReader_AxisRecovery", "[HDF5][Full]") {
|
||||
// saturation_value is written inclusive and used exclusive, so a read has to add the count back. It
|
||||
// did not, and the value fell by one on every write-read-write cycle - unbounded, and compounding
|
||||
// whenever a _process.h5 was reprocessed. Nothing caught it: no test asserted the read-back limit.
|
||||
TEST_CASE("JFJochReader_SaturationSurvivesRoundTrip", "[HDF5][Full]") {
|
||||
TEST_CASE("JFJochReader_SaturationSurvivesRoundTrip", "[HDF5][Full][portable]") {
|
||||
DiffractionExperiment x(DetJF(1));
|
||||
x.ImagesPerTrigger(2).OverwriteExistingFiles(true).FilePrefix("test_satrt");
|
||||
x.BeamX_pxl(100).BeamY_pxl(200).DetectorDistance_mm(150)
|
||||
@@ -3958,7 +3958,7 @@ namespace {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("JFJochCBFReader_AxisTableStatesTheMounting", "[HDF5][Full]") {
|
||||
TEST_CASE("JFJochCBFReader_AxisTableStatesTheMounting", "[HDF5][Full][portable]") {
|
||||
const int64_t nx = 24, ny = 16;
|
||||
|
||||
SECTION("a pixel at Count_cutoff is saturated") {
|
||||
@@ -4081,7 +4081,7 @@ namespace {
|
||||
|
||||
// Three ways a CBF that is not a detector image, or is one with a hole in its head, used to be
|
||||
// opened anyway - each of them silently, which is the failure this project cares most about.
|
||||
TEST_CASE("JFJochCBFReader_incomplete_header_is_refused_not_misread", "[HDF5][Full]") {
|
||||
TEST_CASE("JFJochCBFReader_incomplete_header_is_refused_not_misread", "[HDF5][Full][portable]") {
|
||||
const int64_t nx = 24, ny = 16;
|
||||
|
||||
SECTION("a byte-offset CBF with no PILATUS header is not ours to read") {
|
||||
@@ -4128,7 +4128,7 @@ TEST_CASE("JFJochCBFReader_incomplete_header_is_refused_not_misread", "[HDF5][Fu
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("MiniCBF_header_longer_than_the_first_probe", "[HDF5][Full]") {
|
||||
TEST_CASE("MiniCBF_header_longer_than_the_first_probe", "[HDF5][Full][portable]") {
|
||||
// The header is read with a small first probe, and again with the large one when it does not end
|
||||
// inside it; what stands past the first 16 kB must come out exactly as before.
|
||||
std::string filler;
|
||||
@@ -4261,7 +4261,7 @@ namespace {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("JFJochMarCCDReader_Geometry", "[HDF5][Full]") {
|
||||
TEST_CASE("JFJochMarCCDReader_Geometry", "[HDF5][Full][portable]") {
|
||||
const int64_t nx = 24, ny = 16;
|
||||
|
||||
SECTION("the header's geometry reaches the experiment in the units the rest of the code uses") {
|
||||
@@ -4425,7 +4425,7 @@ namespace {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("JFJochSMVReader_Geometry", "[HDF5][Full]") {
|
||||
TEST_CASE("JFJochSMVReader_Geometry", "[HDF5][Full][portable]") {
|
||||
SECTION("a pixel at CCD_IMAGE_SATURATION is saturated, stated or not") {
|
||||
// The pixels are handed out as 32-bit, so without an explicit limit the fallback would be
|
||||
// INT32_MAX and no 16-bit image could ever reach it.
|
||||
|
||||
Reference in new issue
Block a user