diff options
Diffstat (limited to 'test/external/c-testsuite/scripts/lib-exec/setlookup')
| -rwxr-xr-x | test/external/c-testsuite/scripts/lib-exec/setlookup | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/external/c-testsuite/scripts/lib-exec/setlookup b/test/external/c-testsuite/scripts/lib-exec/setlookup new file mode 100755 index 0000000..671a9cb --- /dev/null +++ b/test/external/c-testsuite/scripts/lib-exec/setlookup @@ -0,0 +1,13 @@ +#! /usr/bin/env python3 + +import sys +import sqlite3 + +found=False +with sqlite3.connect(sys.argv[1]) as conn: + c = conn.cursor() + c.execute('''SELECT COUNT(*) FROM LUT WHERE k = ?;''', (sys.argv[2],)) + if c.fetchone()[0] > 0: + found=True +if not found: + sys.exit(1)
\ No newline at end of file |