Debian Codegraph @

testing/performance/mobile-startup/cvne-newssite.sh

raw
1 #!/bin/bash
2
3 #name: newssite-applink-startup
4 #owner: perftest
5 #description: Runs the newssite applink startup(cvne) test for chrome/fenix
6
7 # Path to the Python script
8 SCRIPT_PATH="testing/performance/mobile-startup/android_startup_videoapplink.py"
9
10 # Start up a local http server.
11 $PYTHON_PATH_SHELL_SCRIPT -m http.server --directory testing/performance/mobile-startup/newssite-nuxt \
12 > $TESTING_DIR/server.log 2>&1 &
13 SERVER_PID=$!
14
15 echo "HTTP server started with PID $SERVER_PID, logs are in server.log"
16
17 # Reroute localhost:8000 on the device to the host.
18 adb reverse tcp:8000 tcp:8000
19
20 # Run the Python script
21 $PYTHON_PATH_SHELL_SCRIPT $SCRIPT_PATH $APP cold_view_nav_end http://localhost:8000
22
23 # Remove all reverse rules
24 adb reverse --remove-all
25
26 # Kill python server
27 kill $SERVER_PID