mirror of
https://github.com/Orange-OpenSource/hurl.git
synced 2024-12-23 11:02:43 +03:00
Clean script
This commit is contained in:
parent
7fbedb5a7a
commit
5af47c3f33
13
build.sh
13
build.sh
@ -1,10 +1,6 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
|
||||
ROOT_DIR="$(dirname "$0")"
|
||||
|
||||
#cargo clean
|
||||
cargo build --features "strict"
|
||||
cargo test
|
||||
cargo doc --document-private-items
|
||||
@ -12,15 +8,6 @@ cargo doc --document-private-items
|
||||
touch src/lib.rs
|
||||
cargo clippy -- -D warnings
|
||||
|
||||
DOCS_DIR="$ROOT_DIR/docs"
|
||||
MAN_DIR="$ROOT_DIR/target/man"
|
||||
mkdir -p "$MAN_DIR"
|
||||
cp "$DOCS_DIR/hurl.1" "$MAN_DIR"
|
||||
cp "$DOCS_DIR/hurlfmt.1" "$MAN_DIR"
|
||||
gzip "$MAN_DIR"/hurl.1
|
||||
gzip "$MAN_DIR"/hurlfmt.1
|
||||
|
||||
|
||||
echo
|
||||
echo "!!! Build successful !!!"
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
rm -rf target/man
|
||||
mkdir -p target/man
|
||||
cp docs/hurl.1 target/man
|
||||
cp docs/hurlfmt.1 target/man
|
||||
|
@ -10,9 +10,7 @@ cargo install cargo-deb
|
||||
|
||||
# Python/Flask
|
||||
sudo apt-get install python3-pip
|
||||
which python3
|
||||
python3 -V
|
||||
which pip3
|
||||
pip3 install Flask
|
||||
(cd integration && python3 server.py&)
|
||||
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
for command_file in "$@"; do
|
||||
echo "$command_file"
|
||||
command=$(cat $command_file)
|
||||
expected=$(cat ${command_file%.*}.output)
|
||||
command=$(cat "$command_file")
|
||||
expected=$(cat "${command_file%.*}.output")
|
||||
output="$($command 2>&1)"
|
||||
|
||||
if [ "$output" != "$expected" ]; then
|
||||
@ -11,4 +11,4 @@ for command_file in "$@"; do
|
||||
exit 1
|
||||
fi
|
||||
|
||||
done
|
||||
done
|
||||
|
@ -18,8 +18,8 @@ for hurl_file in "$@"; do
|
||||
fi
|
||||
|
||||
STDERR_ACTUAL=$(cat /tmp/test.stderr)
|
||||
STDERR_EXPECTED=$(cat ${hurl_file%%.*}.err)
|
||||
diff ${hurl_file%%.*}.err /tmp/test.stderr
|
||||
STDERR_EXPECTED=$(cat "${hurl_file%%.*}.err")
|
||||
diff "${hurl_file%%.*}.err" /tmp/test.stderr
|
||||
if [ "$STDERR_ACTUAL" != "$STDERR_EXPECTED" ]; then
|
||||
echo "ERROR stderr"
|
||||
echo " expected:"
|
||||
@ -31,7 +31,7 @@ for hurl_file in "$@"; do
|
||||
|
||||
hurlfmt "$hurl_file" --no-color >/tmp/test.lint
|
||||
LINT_ACTUAL=$(cat /tmp/test.lint)
|
||||
LINT_EXPECTED=$(cat ${hurl_file%%.*}.hurl.lint)
|
||||
LINT_EXPECTED=$(cat "${hurl_file%%.*}.hurl.lint")
|
||||
if [ "$LINT_ACTUAL" != "$LINT_EXPECTED" ]; then
|
||||
echo "ERROR linting"
|
||||
echo " expected:"
|
||||
|
@ -10,7 +10,7 @@ for hurl_file in "$@"; do
|
||||
options+=("$(cat "${hurl_file%.*}.options")")
|
||||
fi
|
||||
|
||||
cmd="hurl $hurl_file ${options[@]}"
|
||||
cmd="hurl $hurl_file ${options[*]}"
|
||||
echo "$cmd"
|
||||
|
||||
$cmd 2>/tmp/test.stderr >/tmp/test.stdout
|
||||
|
Loading…
Reference in New Issue
Block a user