fast jenkins (#21472)
* speed up setup * speedup onroad test * .git doesn't like inplace * tici2 * no inplace * revert * fix * that one toopull/21473/head
parent
d2d1aaad08
commit
0bfd994f73
|
@ -180,21 +180,29 @@ pipeline {
|
|||
}
|
||||
*/
|
||||
|
||||
stage('Tici Build') {
|
||||
stage('tici Build') {
|
||||
environment {
|
||||
R3_PUSH = "${env.BRANCH_NAME == 'master' ? '1' : ' '}"
|
||||
}
|
||||
steps {
|
||||
phone_steps("tici", [
|
||||
["build", "cd selfdrive/manager && ./build.py"],
|
||||
["test loggerd", "python selfdrive/loggerd/tests/test_loggerd.py"],
|
||||
["test encoder", "LD_LIBRARY_PATH=/usr/local/lib python selfdrive/loggerd/tests/test_encoder.py"],
|
||||
["onroad tests", "cd selfdrive/test/ && ./test_onroad.py"],
|
||||
//["build release3-staging", "cd release && PUSH=${env.R3_PUSH} ./build_release3.sh"],
|
||||
])
|
||||
}
|
||||
}
|
||||
|
||||
stage('Unit Tests (tici)') {
|
||||
steps {
|
||||
phone_steps("tici2", [
|
||||
["build", "cd selfdrive/manager && ./build.py"],
|
||||
["test loggerd", "python selfdrive/loggerd/tests/test_loggerd.py"],
|
||||
["test encoder", "LD_LIBRARY_PATH=/usr/local/lib python selfdrive/loggerd/tests/test_encoder.py"],
|
||||
])
|
||||
}
|
||||
}
|
||||
|
||||
stage('camerad') {
|
||||
steps {
|
||||
phone_steps("eon-party", [
|
||||
|
|
|
@ -39,17 +39,19 @@ class TestLoggerd(unittest.TestCase):
|
|||
return log_dirs[-1]
|
||||
|
||||
def _get_log_dir(self, x):
|
||||
for p in x.split(' '):
|
||||
path = Path(p.strip())
|
||||
if path.is_dir():
|
||||
return path
|
||||
for l in x.splitlines():
|
||||
for p in l.split(' '):
|
||||
path = Path(p.strip())
|
||||
if path.is_dir():
|
||||
return path
|
||||
return None
|
||||
|
||||
def _get_log_fn(self, x):
|
||||
for p in x.split(' '):
|
||||
path = Path(p.strip())
|
||||
if path.is_file():
|
||||
return path
|
||||
for l in x.splitlines():
|
||||
for p in l.split(' '):
|
||||
path = Path(p.strip())
|
||||
if path.is_file():
|
||||
return path
|
||||
return None
|
||||
|
||||
def _gen_bootlog(self):
|
||||
|
|
|
@ -42,7 +42,7 @@ class TestManager(unittest.TestCase):
|
|||
for p in ALL_PROCESSES:
|
||||
managed_processes[p].start()
|
||||
|
||||
time.sleep(30)
|
||||
time.sleep(10)
|
||||
|
||||
for p in reversed(ALL_PROCESSES):
|
||||
state = managed_processes[p].get_process_state_msg()
|
||||
|
|
|
@ -12,20 +12,6 @@ if [ -z "$TEST_DIR" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
# setup jenkins device
|
||||
if [ ! -d "$SOURCE_DIR" ]; then
|
||||
# write continue.sh
|
||||
CONTINUE_FILE="/data/data/com.termux/files/continue.sh"
|
||||
echo "#!/usr/bin/bash" > $CONTINUE_FILE
|
||||
echo "wpa_cli IFNAME=wlan0 SCAN" >> $CONTINUE_FILE
|
||||
echo "sleep infinity" >> $CONTINUE_FILE
|
||||
|
||||
# write SSH keys
|
||||
curl "https://github.com/commaci2.keys" > /data/params/d/GithubSshKeys
|
||||
|
||||
git clone --depth 1 https://github.com/commaai/openpilot.git "$SOURCE_DIR"
|
||||
fi
|
||||
|
||||
if [ -f "/EON" ]; then
|
||||
rm -rf /data/core
|
||||
rm -rf /data/neoupdate
|
||||
|
@ -34,17 +20,15 @@ fi
|
|||
|
||||
# set up environment
|
||||
cd $SOURCE_DIR
|
||||
git reset --hard
|
||||
git fetch
|
||||
find . -maxdepth 1 -not -path './.git' -not -name '.' -not -name '..' -exec rm -rf '{}' \;
|
||||
git fetch origin $GIT_COMMIT
|
||||
git reset --hard $GIT_COMMIT
|
||||
git checkout $GIT_COMMIT
|
||||
git clean -xdf
|
||||
git submodule update --init --recursive
|
||||
git submodule foreach --recursive git reset --hard
|
||||
git submodule foreach --recursive git clean -xdf
|
||||
echo "git checkout took $SECONDS seconds"
|
||||
git submodule foreach --recursive "git reset --hard && git clean -xdf"
|
||||
|
||||
echo "git checkout done, t=$SECONDS"
|
||||
|
||||
rsync -a --delete $SOURCE_DIR $TEST_DIR
|
||||
|
||||
echo "$TEST_DIR synced with $GIT_COMMIT, took $SECONDS seconds"
|
||||
echo "$TEST_DIR synced with $GIT_COMMIT, t=$SECONDS"
|
||||
|
|
Loading…
Reference in New Issue