From 3f7f9f99e070aaece707564b4d920560f3fe4591 Mon Sep 17 00:00:00 2001 From: Suzanne Soy Date: Sun, 21 Feb 2021 20:54:19 +0000 Subject: [PATCH] debug --- .github/workflows/ci.yml | 6 ++++-- flake.nix | 2 +- test.py | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2fe7cd2..162c5de 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,9 @@ jobs: run: nix build path://$PWD/ - name: Run tests run: PATH="$PWD/result/bin:$PATH" ./test.py + - name: Run tests + run: PATH="$PWD/result/bin:$PATH" ./test.py - uses: actions/upload-artifact@v2 with: - name: debug - path: /tmp/debug.tar.xz + name: debug.tar.gz + path: /tmp/debug.tar.gz diff --git a/flake.nix b/flake.nix index fbb95e5..6219d6c 100644 --- 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 ]; in + let mypackages = with nixpkgs; [ coreutils python3 sqlite awk ]; in with import nixpkgs-git { system = "x86_64-linux"; }; symlinkJoin { diff --git a/test.py b/test.py index f913315..91bee27 100755 --- a/test.py +++ b/test.py @@ -32,7 +32,8 @@ 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'e8e0e538fa2a79a6c03d5575734bb77ee8c8734b07201d3d7dfc289c118d81a4': print("test passed") + print(subprocess.check_output("tar -zcf /tmp/debug.tar.gz .", cwd=tempdir, shell=True)) else: print("TEST FAILED: got hash " + repr(h)) - print(subprocess.check_output("tar -Jcf /tmp/debug.tar.xz .", cwd=tempdir, shell=True)) + print(subprocess.check_output("tar -zcf /tmp/debug.tar.gz .", cwd=tempdir, shell=True)) exit(0) \ No newline at end of file