Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1c451b9

Browse filesBrowse files
author
Takashi Matsuo
committed
don't rely on git, remove noxfile.py only if we copied it
1 parent 2754611 commit 1c451b9
Copy full SHA for 1c451b9

File tree

Expand file treeCollapse file tree

1 file changed

+14
-9
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+14
-9
lines changed

‎.kokoro/tests/run_tests.sh

Copy file name to clipboardExpand all lines: .kokoro/tests/run_tests.sh
+14-9Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -136,13 +136,16 @@ for file in **/requirements.txt; do
136136

137137
# If no local noxfile exists, copy the one from root
138138
if [[ ! -f "noxfile.py" ]]; then
139-
PARENT_DIR=$(cd ../ && pwd)
140-
while [[ "$PARENT_DIR" != "$ROOT" && ! -f "$PARENT_DIR/noxfile-template.py" ]];
141-
do
142-
PARENT_DIR=$(dirname "$PARENT_DIR")
143-
done
144-
cp "$PARENT_DIR/noxfile-template.py" "./noxfile.py"
145-
echo -e "\n Using noxfile-template from parent folder ($PARENT_DIR). \n"
139+
PARENT_DIR=$(cd ../ && pwd)
140+
while [[ "$PARENT_DIR" != "$ROOT" && ! -f "$PARENT_DIR/noxfile-template.py" ]];
141+
do
142+
PARENT_DIR=$(dirname "$PARENT_DIR")
143+
done
144+
cp "$PARENT_DIR/noxfile-template.py" "./noxfile.py"
145+
echo -e "\n Using noxfile-template from parent folder ($PARENT_DIR). \n"
146+
cleanup_noxfile=1
147+
else
148+
cleanup_noxfile=0
146149
fi
147150

148151
# Use nox to execute the tests for the project.
@@ -165,8 +168,10 @@ for file in **/requirements.txt; do
165168
echo -e "\n Testing completed.\n"
166169
fi
167170

168-
# Remove noxfile.py if it's not tracked by git.
169-
git ls-files --error-unmatch noxfile.py > /dev/null 2>&1 | rm noxfile.py
171+
# Remove noxfile.py if we copied.
172+
if [[ $cleanup_noxfile -eq 1 ]]; then
173+
rm noxfile.py
174+
fi
170175

171176
done
172177
cd "$ROOT"

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.