commit | c361f00e51d711e0cf703960c834a0f233ff912f | [log] [tgz] |
---|---|---|
author | Commit Bot <commit-bot@chromium.org> | Mon Jan 06 06:04:05 2020 |
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | Mon Jan 06 06:04:05 2020 |
tree | b23f6ce2cf564a01f4e08d2f0aa3f62287ba2a5c | |
parent | 7ec2bf6f1400efb65361160c3e9d575e38dc9c7b [diff] | |
parent | a5b40e78c33e8f2e85b324d3a7936d2a75ab2829 [diff] |
Merge "suite_scheduler: Add experimental boards(Crosbolt)"
Due to https://crbug.com/792690, this must be run outside the chroot.
Install Google Cloud SDK:
Follow the instructions.
Install the Python App Engine component:
sudo apt-get install google-cloud-sdk-app-engine-python
Log in to gcloud: gcloud auth login LDAP@google.com
Install pip
:
sudo apt-get install python-pip
Run python setup_environment.py
to download third-party libraries and credentials.
Failed to install third-packages in requirement.txt:
Workround: Run pip install -t lib -r requirements.txt
locally on your workstation to verify whether it could work.
Failed to download credentials from ‘gs://suite-scheduler.google.com.a.appspot.com/credentials/’:
Workround: Run gsutil ls gs://suite-scheduler.google.com.a.appspot.com/credentials/
locally on your workstation to verify whether you can fetch credentials with gsutil.
If there's any auth issue, it may be because
a. You‘re not using your corp account to login gcloud. Please run gcloud auth list
to check what’s the used account for gcloud.
b. Your corp account is not whitelisted by suite-scheduler project. Please contact @xixuan to whitelist your ldap.
Presubmit will kick off sanity test for verifying suite_scheduler.ini:
python runner.py --test_type sanity
Run unittest:
python runner.py' or 'python runner.py --test_type unittest
Run integration test:
python runner.py --test_type integration
Run tests with debug mode:
python runner.py --debug
Run suite scheduler v2 as a local development server:
If you want to verify any APIs locally, you can run suite scheduler v2 as a local development server (https://cloud.google.com/appengine/docs/standard/python/tools/using-local-server):
a. Finally, start dev_appserver.py in a window:
dev_appserver.py app.yaml \ --port=8888 \ --admin_port=8001 \ --log_level=debug
b. Test it:
curl 'http://localhost:8888/cron/trigger_event', or open it in chrome.
Please note that once a dev_appserver is started, it simulates data_store & task_queue, which means:
a. The datastore doesn‘t contain any previous cron run’s information, so the first round of cron/trigger_event won't trigger any event.
b. The task queue is newly created with 0 tasks in it unless cron/trigger_event adds tasks in it. Dev_appserver restart will cause the local task queue to get purged.