forked from tensorflow/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest-all
executable file
·33 lines (29 loc) · 1.41 KB
/
test-all
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
set -e
# Make sure the Tensorflow version in the -sys build script matches the one in
# the run-valgrind script.
version_build_script=`grep "const VERSION" tensorflow-sys/build.rs | sed 's|.*"\([^"]*\)";|\1|g'`
version_run_valgrind=`grep "tensorflow_version=" run-valgrind | sed "s|.*=\(.*\)|\1|g"`
if [[ "${version_build_script}" != "${version_run_valgrind}" ]]; then
echo "ERROR: Tensorflow version specified in build script does not match the one in the"
echo " valgrind run script."
echo " tensorflow-sys/build.rs: ${version_build_script}"
echo " run-valgrind: ${version_run_valgrind}"
exit 1
fi
# Make sure the crate version matches the one in README.md.
version_crate=`grep "^version =" Cargo.toml | sed 's|.*= "\(.*\)"|\1|g'`
version_readme=`grep "tensorflow =" README.md | sed 's|.*= "\(.*\)"|\1|g'`
if [[ "${version_crate}" != "${version_readme}" ]]; then
echo "ERROR: Crate version does not match the one in README.md."
echo " Cargo.toml: ${version_crate}"
echo " README.md: ${version_readme}"
exit 1
fi
cargo test -vv -j 2 --features tensorflow_unstable
cargo run --example regression
cargo run --features tensorflow_unstable --example expressions
cargo doc -vv --features tensorflow_unstable
# TODO(#66): Re-enable: (cd tensorflow-sys && cargo test -vv -j 1)
(cd tensorflow-sys && cargo run --example multiplication)
(cd tensorflow-sys && cargo doc -vv)