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
9 changes: 7 additions & 2 deletions .github/workflows/jtreg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,15 @@ jobs:
cache: pnpm
- uses: actions/cache@v6
with:
path: ~/.cache/java-web
# the downloads build-jdk.sh keeps; boot snapshots there stay out
path: |
~/.cache/java-web/jdk-*
~/.cache/java-web/dejavu-*
key: jdk-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('scripts/build-jdk.sh') }}
- run: pnpm install --frozen-lockfile
- run: pnpm jdk
# each test VM starts from the bundle, which loads faster than src/
- run: pnpm build
- name: OpenJDK regression tests
env:
FILTERS: ${{ needs.plan.outputs.filters }}
Expand All @@ -70,7 +75,7 @@ jobs:
dirs=$(grep -v '^#' test/jtreg/passing.txt | cut -d/ -f1-2 | sort -u | sed 's|^|test/jdk/|')
git -C build/ref/jdk25u sparse-checkout set test/lib test/jdk/lib test/jdk/tools/lib $dirs
read -ra filters <<< "$FILTERS"
node scripts/jtreg/run.ts build/ref/jdk25u --only-passing --jobs 4 --timeout 600 \
node scripts/jtreg/run.ts build/ref/jdk25u --only-passing --jobs 4 --timeout 600 --vm dist/node.js \
--shard ${{ matrix.shard }}/${{ strategy.job-total }} "${filters[@]}"

# one check for branch protection, whatever the number of shards
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ jobs:
cache: pnpm
- uses: actions/cache@v6
with:
path: ~/.cache/java-web
# the downloads build-jdk.sh keeps; boot snapshots there stay out
path: |
~/.cache/java-web/jdk-*
~/.cache/java-web/dejavu-*
key: jdk-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('scripts/build-jdk.sh') }}
- run: pnpm install --frozen-lockfile
- run: pnpm jdk
Expand Down
6 changes: 4 additions & 2 deletions scripts/jtreg/select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ const root = join(import.meta.dirname, "..", "..");
const passingFile = "test/jtreg/passing.txt";

// TypeScript the tests load: everything src/node.ts (the VM each test runs on),
// the runner and this selection import, followed through their imports. Other .ts files under
// src/ and scripts/ (the page API, the web build) cannot change a test's result.
// the web build that bundles it into dist/node.js, the runner and this
// selection import, followed through their imports. Other .ts files under
// src/ and scripts/ (the page API) cannot change a test's result.
function loaded(): Set<string> {
const seen = new Set<string>();
const visit = (file: string) => {
Expand All @@ -26,6 +27,7 @@ function loaded(): Set<string> {
for (const m of text.matchAll(/(?:from|import)\s*\(?\s*["'](\.{1,2}\/[^"']+\.ts)["']/g)) visit(join(dirname(file), m[1]));
};
visit("src/node.ts");
visit("scripts/build-web.ts");
visit("scripts/jtreg/run.ts");
visit("scripts/jtreg/select.ts");
return seen;
Expand Down
Loading