Skip to content

Commit

Permalink
Prevent double-zip generation
Browse files Browse the repository at this point in the history
  • Loading branch information
Luc45 committed Dec 16, 2023
1 parent 5679dee commit ff1cf9f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion _tests/QITSelfTests.php
Original file line number Diff line number Diff line change
Expand Up @@ -445,11 +445,19 @@ class $name extends QITE2ETestCase {
}

function generate_zips( array $test_type_test_runs ) {
$zip_processes = [];
$zip_processes = [];
$generated_zips = [];
foreach ( $test_type_test_runs as $t ) {
$path = $t['path'];
$slug = Context::$sut_slug;

$generated_zips[] = md5( $path . $slug );

if ( in_array( md5( $path . $slug ), $generated_zips ) ) {
echo "[INFO] Skipping zip generation for test: {$t['test_function_name']} (Another test in same dir already zipped)\n";
continue;
}

if ( getenv( 'CI' ) ) {
// In CI environment, execute the zipping command directly to avoid downloading the zip docker image.
$args = [
Expand Down

0 comments on commit ff1cf9f

Please sign in to comment.