speedup prebuilt check (#31065)

* speedup prebuilt check

* one place
pull/31066/head
Adeeb Shihadeh 1 year ago committed by GitHub
parent ce947ffe9a
commit e3b17d10f3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 9
      launch_chffrplus.sh
  2. 3
      selfdrive/manager/build.py

@ -72,14 +72,19 @@ function launch {
export PYTHONPATH="$PWD" export PYTHONPATH="$PWD"
# hardware specific init # hardware specific init
agnos_init if [ -f /AGNOS ]; then
agnos_init
fi
# write tmux scrollback to a file # write tmux scrollback to a file
tmux capture-pane -pq -S-1000 > /tmp/launch_log tmux capture-pane -pq -S-1000 > /tmp/launch_log
# start manager # start manager
cd selfdrive/manager cd selfdrive/manager
./build.py && ./manager.py if [ ! -f $DIR/prebuilt ]; then
./build.py
fi
./manager.py
# if broken, keep on screen error # if broken, keep on screen error
while true; do sleep 1; done while true; do sleep 1; done

@ -17,7 +17,6 @@ CACHE_DIR = Path("/data/scons_cache" if AGNOS else "/tmp/scons_cache")
TOTAL_SCONS_NODES = 2560 TOTAL_SCONS_NODES = 2560
MAX_BUILD_PROGRESS = 100 MAX_BUILD_PROGRESS = 100
PREBUILT = os.path.exists(os.path.join(BASEDIR, 'prebuilt'))
def build(spinner: Spinner, dirty: bool = False, minimal: bool = False) -> None: def build(spinner: Spinner, dirty: bool = False, minimal: bool = False) -> None:
env = os.environ.copy() env = os.environ.copy()
@ -85,7 +84,7 @@ def build(spinner: Spinner, dirty: bool = False, minimal: bool = False) -> None:
f.unlink() f.unlink()
if __name__ == "__main__" and not PREBUILT: if __name__ == "__main__":
spinner = Spinner() spinner = Spinner()
spinner.update_progress(0, 100) spinner.update_progress(0, 100)
build(spinner, is_dirty(), minimal = AGNOS) build(spinner, is_dirty(), minimal = AGNOS)

Loading…
Cancel
Save