Skip to content
This repository has been archived by the owner on Feb 9, 2024. It is now read-only.

make: update parse file to fix CI failures #8

Merged
merged 1 commit into from
Sep 14, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
PARSE_FILE := cmd/margo_verify_firefox/parse.go

all: lint vet test getsamplemar testparser testsigner

lint:
Expand All @@ -21,11 +23,11 @@ getsamplemar:
fi

testparser:
go run -ldflags "-X go.mozilla.org/mar.debug=true" examples/parse.go firefox-60.0esr-60.0.1esr.partial.mar 2>&1 | grep 'signature: OK, valid signature from release1_sha384'
go run -ldflags "-X go.mozilla.org/mar.debug=true" ${PARSE_FILE} firefox-60.0esr-60.0.1esr.partial.mar 2>&1 | grep 'signature: OK, valid signature from release1_sha384'

testsigner:
go run -ldflags "-X go.mozilla.org/mar.debug=true" examples/sign.go firefox-60.0esr-60.0.1esr.partial.mar /tmp/resigned.mar
go run examples/parse.go /tmp/resigned.mar
go run ${PARSE_FILE} /tmp/resigned.mar

getmarcorpus:
@if [ ! -e /tmp/marworkdir ]; then mkdir /tmp/marworkdir; fi
Expand All @@ -39,12 +41,11 @@ getmarcorpus:
@if [ ! -e /tmp/marworkdir/firefox-60.0esr-60.0.1esr.partial.mar ]; then wget -P /tmp/marworkdir http://download.cdn.mozilla.net/pub/firefox/releases/60.0.1esr/update/win64/en-US/firefox-60.0esr-60.0.1esr.partial.mar; fi

testmarcorpus:
for f in $$(ls /tmp/marworkdir/firefox*.mar); do go run examples/parse.go "$$f"; done
for f in $$(ls /tmp/marworkdir/firefox*.mar); do go run ${PARSE_FILE} "$$f"; done

fuzz: getmarcorpus
go get -u github.com/dvyukov/go-fuzz/...
go-fuzz-build go.mozilla.org/mar
go-fuzz -bin=mar-fuzz.zip -workdir=/tmp/marworkdir

.PHONY: all lint vet test getkeys getsamplemar testparser