Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,17 +134,25 @@ jobs:
- name: build
run: cmake --build build --config Release

- name: portable core smoke tests
if: runner.os != 'macOS'
run: >
ctest --test-dir build/test -C Release --output-on-failure
-R '^(ViewStream|Stream|ByteStream|DeferredBuffer|CryptoUtil|Path|PngUtil|PdfImage|TablePosition)\.'

- name: release helper tests
if: runner.os == 'Linux' && matrix.bindings
run: python -m unittest discover -s scripts/tests

- name: save ccache
if: github.ref == 'refs/heads/main'
uses: actions/cache/save@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5
with:
path: ${{ env.CCACHE_DIR }}
key: ccache-${{ env.CACHE_FLAVOR }}-${{ matrix.host_profile }}-${{ env.CCACHE_KEY_SUFFIX }}-${{ github.run_id }}

# Both suites run in seconds, so they stay in this job rather than paying
# an artifact round-trip. The heavy `odr_test` still runs in `test`, which
# needs firefox and the reference output — this job compiles `odr_test`
# but never runs it, so it never fetches the data either.
# Bindings and smoke tests need no fetched data. The macOS `test` job
# handles the document corpus and reference output.
- name: junit
if: matrix.bindings
run: ctest --test-dir build/jni --output-on-failure
Expand Down
7 changes: 5 additions & 2 deletions test/src/test_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,13 @@ std::vector<TestFile> get_test_files(const std::string &root_path,
}

std::vector<TestFile> get_test_files() {
const std::string root = TestData::test_input_directory();
if (!fs::is_directory(root)) {
return {};
}
std::vector<TestFile> result;

for (const std::string root = TestData::test_input_directory();
const auto &e : fs::directory_iterator(root)) {
for (const auto &e : fs::directory_iterator(root)) {
const auto files = get_test_files(root, e.path().string());
result.insert(std::end(result), std::begin(files), std::end(files));
}
Expand Down
Loading