Skip to content

Commit

Permalink
Tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
reglim authored and neolynx committed Jun 8, 2024
1 parent 7bb5a10 commit c8ea704
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,11 @@ endif
system-test: install system/env
ifeq ($(RUN_LONG_TESTS), yes)
go generate
go test -v -coverpkg="./..." -c -tags testruncli
go build -coverpkg="./..." -cover -tags testruncli -o aptly.test
if [ ! -e ~/aptly-fixture-db ]; then git clone https://github.com/aptly-dev/aptly-fixture-db.git ~/aptly-fixture-db/; fi
if [ ! -e ~/aptly-fixture-pool ]; then git clone https://github.com/aptly-dev/aptly-fixture-pool.git ~/aptly-fixture-pool/; fi
PATH=$(BINPATH)/:$(PATH) && . system/env/bin/activate && APTLY_VERSION=$(VERSION) $(PYTHON) system/run.py --long $(TESTS) --coverage-dir $(COVERAGE_DIR) $(CAPTURE)
ls -la $(COVERAGE_DIR)
endif

docker-test: install
Expand Down
8 changes: 4 additions & 4 deletions system/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import urllib.request
import zlib
from pathlib import Path
from uuid import uuid4


def ungzip_if_required(output):
Expand Down Expand Up @@ -274,12 +273,13 @@ def _start_process(self, command, stderr=subprocess.STDOUT, stdout=None):
command = string.Template(command).substitute(params)
command = shlex.split(command)

environ = os.environ.copy()
environ["LC_ALL"] = "C"
if command[0] == "aptly":
environ["GOCOVERDIR"] = self.coverage_dir
aptly_testing_bin = Path(__file__).parent / ".." / "aptly.test"
command = [str(aptly_testing_bin), f"-test.coverprofile={Path(self.coverage_dir) / self.__class__.__name__}-{uuid4()}.out", *command[1:]]
command = [str(aptly_testing_bin), *command[1:]]

environ = os.environ.copy()
environ["LC_ALL"] = "C"
environ.update(self.environmentOverride)
return subprocess.Popen(command, stderr=stderr, stdout=stdout, env=environ)

Expand Down

0 comments on commit c8ea704

Please sign in to comment.