Skip to content

Commit 52fbbab

Browse files
committed
Merge branch 'main' into loris/update-web3js-2
2 parents ed59cb0 + 30eaca3 commit 52fbbab

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

scripts/ci/fd-conformance.mjs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,20 @@ await $`CORE_BPF_PROGRAM_ID=${getProgramId('program')} \
7171
--lib --release --target x86_64-unknown-linux-gnu --features core-bpf`;
7272
await $`mv ${solFuzzAgaveTargetPath} ${testTargetPathCoreBpf}`;
7373

74+
// Remove any test results if they exist.
75+
await $`rm -rf test_results`;
76+
7477
// Run the tests.
7578
await $`source test_suite_env/bin/activate && \
7679
solana-test-suite run-tests \
7780
-i ${fixturesPath} -s ${testTargetPathBuiltin} -t ${testTargetPathCoreBpf}`;
7881

7982
// Assert conformance.
8083
// There should be no fixtures in the `failed_protobufs` directory.
81-
if (fs.readdirSync('test_results/failed_protobufs').length > 0) {
82-
throw new Error(`Error: mismatches detected.`);
83-
} else {
84-
console.log('All tests passed.');
84+
if (fs.existsSync('test_results/failed_protobufs')) {
85+
if (fs.readdirSync('test_results/failed_protobufs').length > 0) {
86+
throw new Error(`Error: mismatches detected.`);
87+
}
8588
}
89+
90+
console.log('All tests passed.');

0 commit comments

Comments
 (0)