Skip to content

Commit

Permalink
fix actions and add max_queries to fuzzer script
Browse files Browse the repository at this point in the history
  • Loading branch information
Tmonster committed Jul 12, 2024
1 parent 84832cf commit cf29fe2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/test-fuzzer-ci-still-works.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: test-fuzzer-ci-still-works
on:
workflow_dispatch:
repository_dispatch:
pull_request:
push:
branches:
- '**'
Expand Down Expand Up @@ -30,6 +30,7 @@ jobs:
run: sudo apt-get update -y -qq && sudo apt-get install -y -qq ninja-build ccache

- name: checkout
repository: duckdb/duckdb
uses: actions/checkout@v3

- name: Setup Ccache
Expand All @@ -45,7 +46,7 @@ jobs:
needs:
- build-duckdb
runs-on: ubuntu-latest
timeout-minutes: 120
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
Expand All @@ -56,6 +57,7 @@ jobs:
- uses: actions/checkout@v3
with:
repository: duckdb/duckdb_sqlsmith
path: duckdb_sqlsmith
fetch-depth: 0

- name: Download a single artifact
Expand All @@ -70,9 +72,10 @@ jobs:
runtime="1 minute"
endtime=$(date -ud "$runtime" +%s)
cd duckdb_sqlsmith
while [[ $(date -u +%s) -le $endtime ]]
do
echo "Time Now: `date +%H:%M:%S`"
python3 scripts/run_fuzzer.py --no_checks --${{ matrix.fuzzer }} --${{ matrix.data }} --shell=./duckdb --dry
python3 scripts/run_fuzzer.py --no_checks --${{ matrix.fuzzer }} --${{ matrix.data }} --shell=../duckdb --dry --max_queries=10
done
5 changes: 4 additions & 1 deletion scripts/run_fuzzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
shell = None
perform_checks = True
dry = False
max_queries = 1000
for param in sys.argv:
if param == '--sqlsmith':
fuzzer = 'sqlsmith'
Expand All @@ -33,6 +34,8 @@
shell = param.replace('--shell=', '')
elif param.startswith('--seed='):
seed = int(param.replace('--seed=', ''))
elif param.startswith('--max_queries='):
max_queries = int(param.replace('--max_queries=', ''))
elif param.startswith('--dry'):
dry = True

Expand Down Expand Up @@ -102,7 +105,7 @@ def run_shell_command(cmd):
else:
current_errors = fuzzer_helper.extract_github_issues(shell, perform_checks)

max_queries = 1000

last_query_log_file = 'sqlsmith.log'
complete_log_file = 'sqlsmith.complete.log'

Expand Down

0 comments on commit cf29fe2

Please sign in to comment.