Added grep & sed dependencies, disabled debug messages

This commit is contained in:
Suzanne Soy 2021-02-21 23:44:14 +00:00
parent 17d5483070
commit 49c90167b0
3 changed files with 5 additions and 8 deletions

View File

@ -8,7 +8,7 @@
let system = "x86_64-linux"; in
let nixpkgs = import nixpkgs-git { config = { allowUnfree = true;}; system = system; }; in
let mypackages = with nixpkgs; [ coreutils python3 sqlite gawk git file bash bashInteractive gnutar gzip ]; in
let mypackages = with nixpkgs; [ coreutils python3 sqlite gawk git file bash bashInteractive gnutar gzip gnugrep gnused ]; in
with import nixpkgs-git { system = "x86_64-linux"; };
symlinkJoin {

View File

@ -5,7 +5,8 @@ import sys
import subprocess
def debug(s):
print(s, file=sys.stderr, flush=True)
#print(s, file=sys.stderr, flush=True)
pass
def hashFile(filename):

View File

@ -59,11 +59,9 @@ with tempfile.TemporaryDirectory(prefix="test", dir="/tmp") as tempdir:
h = subprocess.check_output([os.path.abspath('./hash-files.py'), 'test/foo'], cwd=tempdir).strip()
if h == b'f31eb7e1bcb25e79be0d1305d58eeadbe3fd9bf38ecbd0449789e8c91b5f4340':
print("test passed: git\n", flush=True)
subprocess.check_output("tar -zcf /tmp/debug-git.tar.gz .", cwd=tempdir, shell=True)
else:
print("TEST FAILED: git: got hash " + repr(h) + "\n", flush=True)
subprocess.check_output("tar -zcf /tmp/debug-git.tar.gz .", cwd=tempdir, shell=True)
exit(0)
exit(1)
# Sqlite
with tempfile.TemporaryDirectory(prefix="test", dir="/tmp") as tempdir:
@ -96,11 +94,9 @@ with tempfile.TemporaryDirectory(prefix="test", dir="/tmp") as tempdir:
h = subprocess.check_output([os.path.abspath('./hash-files.py'), 'test/foo'], cwd=tempdir).strip()
if h == b'b775b5c3ad1b403c08fa88e43be42bd76143f93c26bf42cb8881c595161a5509':
print("test passed: sqlite\n", flush=True)
subprocess.check_output("tar -zcf /tmp/debug-sql.tar.gz .", cwd=tempdir, shell=True)
else:
print("TEST FAILED: sqlite got hash " + repr(h) + "\n", flush=True)
subprocess.check_output("tar -zcf /tmp/debug-sql.tar.gz .", cwd=tempdir, shell=True)
exit(0)
exit(1)
# Sqlite big table
with tempfile.TemporaryDirectory(prefix="test", dir="/tmp") as tempdir: