diff --git a/.github/kokoro/db-full.sh b/.github/kokoro/db-full.sh index 0512391d..271dc4dc 100755 --- a/.github/kokoro/db-full.sh +++ b/.github/kokoro/db-full.sh @@ -60,20 +60,6 @@ echo "----------------------------------------" rm $tmp exit $DATABASE_RET fi - - # Check there is nothing to do after running... - echo - if [ $(make --dry-run | grep -v 'Nothing to be done' | wc -l) -gt 0 ]; then - echo "The following targets need to still run!" - make --dry-run - echo "----------------------------------------" - echo "Debug output on why they still need to run" - make --dry-run --debug - echo "----------------------------------------" - exit 1 - else - echo "All good, nothing more to do!" - fi ) echo "----------------------------------------" diff --git a/fuzzers/Makefile b/fuzzers/Makefile index dd4cb8c2..bc216696 100644 --- a/fuzzers/Makefile +++ b/fuzzers/Makefile @@ -84,12 +84,12 @@ endif ifeq ($(3),Y) -fuzzer_ok/fuzzer_$(1)_$(XRAY_PART).ok: $(1)/run.$(XRAY_PART).ok fuzzer_ok +fuzzer_ok/fuzzer_$(1)_$(XRAY_PART).ok: $(1)/run.$(XRAY_PART).ok | fuzzer_ok touch fuzzer_ok/fuzzer_$(1)_$(XRAY_PART).ok else -fuzzer_ok/fuzzer_$(1)_$(XRAY_PART).ok: $(1)/run.ok fuzzer_ok +fuzzer_ok/fuzzer_$(1)_$(XRAY_PART).ok: $(1)/run.ok | fuzzer_ok touch fuzzer_ok/fuzzer_$(1)_$(XRAY_PART).ok endif diff --git a/fuzzers/run_fuzzer.py b/fuzzers/run_fuzzer.py index ff6541a4..70870d9d 100755 --- a/fuzzers/run_fuzzer.py +++ b/fuzzers/run_fuzzer.py @@ -466,6 +466,17 @@ def run_fuzzer(fuzzer_name, fuzzer_dir, fuzzer_logdir, logger, will_retry): if not should_run_submake(make_flags): return 0 + fuzzer_runok = os.path.join( + fuzzer_dir, "run.{}.ok".format(os.environ['XRAY_PART'])) + if os.path.exists(fuzzer_runok): + last_modified = datetime.fromtimestamp(os.stat(fuzzer_runok).st_mtime) + + log( + "Skipping as run.{}.ok exists (updated @ {})", + os.environ['XRAY_PART'], last_modified.isoformat()) + + return 0 + fuzzer_runok = os.path.join(fuzzer_dir, "run.ok") if os.path.exists(fuzzer_runok): last_modified = datetime.fromtimestamp(os.stat(fuzzer_runok).st_mtime)