nodejs-packaging/test/run
Stephen Gallagher 8de3f914f4 Make dist-git the upstream repo
Since the scripts and tools in this package are really Fedora
(and derivatives) specific, it doesn't really make a lot of
sense to maintain them in a separate upstream with tarball
releases.

This moves all the files into dist-git and builds the RPM from
there.

Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
2020-09-18 15:50:14 -04:00

19 lines
881 B
Bash
Executable File

#!/bin/sh
ln -sf nodejs.req nodejs_req.py
"$(command -v python2 || echo :)" -m doctest nodejs_req.py || exit 1
"$(command -v python3 || echo :)" -m doctest nodejs_req.py || exit 1
for test in unbundled bundled
do
sed -e "s|//.*$||" < test/$test/package.json.in > test/$test/package.json
echo test/$test/package.json | ./nodejs.prov test/$test/package.json > test/$test/nodejs.prov.out 2> test/$test/nodejs.prov.err
diff -uw test/$test/nodejs.prov.err.exp test/$test/nodejs.prov.err || exit 1
diff -uw test/$test/nodejs.prov.out.exp test/$test/nodejs.prov.out || exit 1
echo test/$test/package.json | ./nodejs.req test/$test/package.json > test/$test/nodejs.req.out 2> test/$test/nodejs.req.err
diff -uw test/$test/nodejs.req.err.exp test/$test/nodejs.req.err || exit 1
diff -uw test/$test/nodejs.req.out.exp test/$test/nodejs.req.out || exit 1
done