www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 49c90167b0b1b8feda8b42bf92b326ff9ee1ec4e
parent 17d5483070fb2dae3950861369f574d7a27b0359
Author: Suzanne Soy <git@suzanne.soy>
Date:   Sun, 21 Feb 2021 23:44:14 +0000

Added grep & sed dependencies, disabled debug messages

Diffstat:
Mflake.nix | 2+-
Mhash-files.py | 3++-
Mtest.py | 8++------
3 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/flake.nix b/flake.nix @@ -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 { diff --git a/hash-files.py b/hash-files.py @@ -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): diff --git a/test.py b/test.py @@ -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: