Skip to content

Commit 44c6505

Browse files
fredrectensorflower-gardener
authored andcommitted
Make the install/import smoke test handle consecutive runs.
Useful when running the test locally multiple times. PiperOrigin-RevId: 419435510
1 parent 3c4ddb8 commit 44c6505

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ci/kokoro/run_install_import_test.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ set -o pipefail # Treat the failure of a command in a pipeline as error.
3535

3636

3737
# Create an isolated Python environment.
38-
mkdir venv
38+
mkdir -p venv
3939
virtualenv ./venv
4040
source ./venv/bin/activate
4141

@@ -45,6 +45,6 @@ pip install --requirement "requirements.txt"
4545
python setup.py install
4646

4747
# Go to another directory and try to import TFMOT.
48-
mkdir /tmp/my_project
49-
pushd /tmp/my_project
48+
TEMP_PROJECT_DIR=$(mktemp --directory)
49+
pushd "${TEMP_PROJECT_DIR}"
5050
python -c "import tensorflow_model_optimization"

0 commit comments

Comments
 (0)