Browse Source

Don't run Valgrind on OSX

It's poorly supported and reports false positives (See also #10)
tags/v0.0.1
Thom Wiggers 5 years ago
parent
commit
07ca665f0b
No known key found for this signature in database GPG Key ID: 1BB0A7CE26E363
3 changed files with 9 additions and 4 deletions
  1. +0
    -2
      .travis.yml
  2. +5
    -1
      Makefile
  3. +4
    -1
      test/check_testvectors.py

+ 0
- 2
.travis.yml View File

@@ -35,7 +35,6 @@ matrix:
homebrew: homebrew:
packages: packages:
- python - python
- valgrind
- os: osx - os: osx
osx_image: xcode10.1 osx_image: xcode10.1
compiler: gcc compiler: gcc
@@ -44,7 +43,6 @@ matrix:
packages: packages:
- gcc@8 - gcc@8
- python - python
- valgrind
env: env:
- MAKETARGET=test-all - MAKETARGET=test-all




+ 5
- 1
Makefile View File

@@ -32,7 +32,11 @@ run-functest: bin/functest_$(subst /,_,$(SCHEME))


.PHONY: run-valgrind .PHONY: run-valgrind
run-valgrind: bin/functest_$(subst /,_,$(SCHEME)) run-valgrind: bin/functest_$(subst /,_,$(SCHEME))
ifeq ($(shell uname -s),Linux)
valgrind --leak-check=full --error-exitcode=1 $< valgrind --leak-check=full --error-exitcode=1 $<
else
echo "Valgrind not supported on this platform."
endif


bin/sanitizer_$(subst /,_,$(SCHEME)): test/$(dir $(SCHEME))functest.c $(wildcard $(SCHEME)/clean/*.c) $(wildcard $(SCHEME)/clean/*.h) | require_scheme bin/sanitizer_$(subst /,_,$(SCHEME)): test/$(dir $(SCHEME))functest.c $(wildcard $(SCHEME)/clean/*.c) $(wildcard $(SCHEME)/clean/*.h) | require_scheme
mkdir -p bin mkdir -p bin
@@ -159,7 +163,7 @@ run-symbol-namespace: test/check_symbol_namespace.py | require_scheme


.PHONY: run-testvectors-all .PHONY: run-testvectors-all
run-testvectors-all: test/check_testvectors.py run-testvectors-all: test/check_testvectors.py
@for scheme in $(ALL_SCHEMES); do \
for scheme in $(ALL_SCHEMES); do \
python3 test/check_testvectors.py $$scheme || exit 1; \ python3 test/check_testvectors.py $$scheme || exit 1; \
done done




+ 4
- 1
test/check_testvectors.py View File

@@ -28,7 +28,10 @@ expectedTestvectorsHash = get_hash(SCHEME)


subprocess.run(["make", "testvectors", "SCHEME={}".format(SCHEME)]) subprocess.run(["make", "testvectors", "SCHEME={}".format(SCHEME)])
implementations = [ implementations = [
x for x in os.listdir('bin') if 'testvectors' in x and SCHEMEFULL in x]
x for x in os.listdir('bin')
if 'testvectors' in x and SCHEMEFULL in x and '.dSYM' not in x

]


for impl in implementations: for impl in implementations:
testvectors = subprocess.run(["bin/{}".format(impl)], testvectors = subprocess.run(["bin/{}".format(impl)],


Loading…
Cancel
Save