Skip to content

Commit

Permalink
test: add coverage scenario for ostree
Browse files Browse the repository at this point in the history
  • Loading branch information
jelly committed Jul 28, 2023
1 parent 0ff6940 commit 049f6a5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ COCKPIT_REPO_STAMP=pkg/lib/cockpit-po-plugin.js
# common arguments for tar, mostly to make the generated tarballs reproducible
TAR_ARGS = --sort=name --mtime "@$(shell git show --no-patch --format='%at')" --mode=go=rX,u+rw,a-s --numeric-owner --owner=0 --group=0

ifeq ($(TEST_COVERAGE),yes)
RUN_TESTS_OPTIONS+=--coverage
NODE_ENV=development
endif

all: $(DIST_TEST)

# checkout common files from Cockpit repository required to build this project;
Expand Down Expand Up @@ -100,11 +105,11 @@ print-version:
dist: $(TARFILE)
@ls -1 $(TARFILE)

# when building a distribution tarball, call bundler with a 'production' environment
# when building a distribution tarball, call bundler with a 'production' environment by default
# we don't ship node_modules for license and compactness reasons; we ship a
# pre-built dist/ (so it's not necessary) and ship package-lock.json (so that
# node_modules/ can be reconstructed if necessary)
$(TARFILE): export NODE_ENV=production
$(TARFILE): export NODE_ENV ?= production
$(TARFILE): $(DIST_TEST) $(SPEC)
tar --xz $(TAR_ARGS) -cf $(TARFILE) --transform 's,^,$(RPM_NAME)/,' \
--exclude $(SPEC).in --exclude node_modules --exclude test/reference \
Expand Down
6 changes: 6 additions & 0 deletions test/run
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ TEST_SCENARIO="${TEST_SCENARIO:-}"
[ "${TEST_SCENARIO}" = "${TEST_SCENARIO##firefox}" ] || export TEST_BROWSER=firefox
export RUN_TESTS_OPTIONS=--track-naughties

TEST_SCENARIO=${TEST_SCENARIO:-}

if [ "$TEST_SCENARIO" = "devel" ]; then
export TEST_COVERAGE=yes
fi

# linters are off by default for production builds, but we want to run them in CI
export LINT=1

Expand Down

0 comments on commit 049f6a5

Please sign in to comment.