1- http " http://localhost:8000/api/tree-report/" git_branch==for-kernelci git_url==https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git origin==maestro
1+ #! /usr/bin/env bash
2+ # Usage:
3+ # ./tree-report-get.sh
4+ # GIT_BRANCH=for-next TREE_NAME=mediatek GIT_URL=https://git.kernel.org/pub/scm/linux/kernel/git/mediatek/linux.git ./tree-report-get.sh
5+ # MIN_AGE_IN_HOURS=24 MAX_AGE_IN_HOURS=48 ./tree-report-get.sh
6+ # Env: GIT_BRANCH, GIT_URL, ORIGIN, TREE_NAME (set TREE_NAME= empty to omit),
7+ # MIN_AGE_IN_HOURS (default 0), MAX_AGE_IN_HOURS (default 24)
28
3- # HTTP/1.1 200 OK
4- # Allow: GET, HEAD, OPTIONS
5- # Content-Length: 3677
6- # Content-Type: application/json
7- # Cross-Origin-Opener-Policy: same-origin
8- # Date: Wed, 02 Jul 2025 17:57:35 GMT
9- # Referrer-Policy: same-origin
10- # Server: WSGIServer/0.2 CPython/3.12.7
11- # Vary: Accept, Cookie, origin
12- # X-Content-Type-Options: nosniff
13- # X-Frame-Options: DENY
9+ GIT_BRANCH=" ${GIT_BRANCH:- master} "
10+ GIT_URL=" ${GIT_URL:- https:// git.kernel.org/ pub/ scm/ linux/ kernel/ git/ torvalds/ linux.git} "
11+ ORIGIN=" ${ORIGIN:- maestro} "
12+ TREE_NAME=" ${TREE_NAME-mainline} "
13+ MIN_AGE_IN_HOURS=" ${MIN_AGE_IN_HOURS:- 0} "
14+ MAX_AGE_IN_HOURS=" ${MAX_AGE_IN_HOURS:- 24} "
1415
15- # {
16- # "boot_status_summary": {
17- # "done_count": 0,
18- # "error_count": 0,
19- # "fail_count": 0,
20- # "miss_count": 13,
21- # "null_count": 0,
22- # "pass_count": 9,
23- # "skip_count": 0
24- # },
25- # "build_status_summary": {
26- # "DONE": 0,
27- # "ERROR": 0,
28- # "FAIL": 0,
29- # "MISS": 0,
30- # "NULL": 0,
31- # "PASS": 9,
32- # "SKIP": 0
33- # },
34- # "checkout_start_time": "2025-07-01T15:08:26.610000Z",
35- # "commit_hash": "3c795c3404e82c4db5c69317847dc5bbafbb368b",
36- # "dashboard_url": "https://d.kernelci.org/tree/arm64/for-kernelci/3c795c3404e82c4db5c69317847dc5bbafbb368b?o=maestro",
37- # "fixed_regressions": {},
38- # "git_branch": "for-kernelci",
39- # "git_url": "https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git",
40- # "origin": "maestro",
41- # "possible_regressions": {},
42- # "test_status_summary": {
43- # "done_count": 0,
44- # "error_count": 0,
45- # "fail_count": 0,
46- # "miss_count": 0,
47- # "null_count": 62,
48- # "pass_count": 592,
49- # "skip_count": 0
50- # },
51- # "unstable_tests": {
52- # "bcm2711-rpi-4-b": {
53- # "defconfig+lab-setup+kselftest": {
54- # "boot": [
55- # {
56- # "id": "maestro:686413d35c2cf25042f65ec8",
57- # "start_time": "2025-07-01T16:58:59.086000Z",
58- # "status": "MISS"
59- # },
60- # {
61- # "id": "maestro:686413cf5c2cf25042f65ead",
62- # "start_time": "2025-07-01T16:58:55.436000Z",
63- # "status": "PASS"
64- # },
65- # {
66- # "id": "maestro:6862e6f15c2cf25042f38ba1",
67- # "start_time": "2025-06-30T19:35:13.117000Z",
68- # "status": "PASS"
69- # },
70- # {
71- # "id": "maestro:6862e6ed5c2cf25042f38b85",
72- # "start_time": "2025-06-30T19:35:09.018000Z",
73- # "status": "PASS"
74- # }
75- # ]
76- # }
77- # },
78- # ...
79- # }
80- # }
16+ args=(
17+ " http://localhost:8000/api/tree-report/"
18+ " git_branch==${GIT_BRANCH} "
19+ " git_url==${GIT_URL} "
20+ " origin==${ORIGIN} "
21+ " min_age_in_hours==${MIN_AGE_IN_HOURS} "
22+ " max_age_in_hours==${MAX_AGE_IN_HOURS} "
23+ )
24+ if [[ -n " ${TREE_NAME} " ]]; then
25+ args+=(" tree_name==${TREE_NAME} " )
26+ fi
27+
28+ http " ${args[@]} "
0 commit comments