Skip to content

Commit

Permalink
Extend kokoro test script with placeholder test results
Browse files Browse the repository at this point in the history
  • Loading branch information
Databean committed Feb 17, 2024
1 parent 10dee95 commit 4b15cf8
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
cuttlefish-*_*.*.*.tar.xz

!/.github/
!/.kokoro/

/*/debian/cuttlefish-*/
/*/debian/*.substvars
Expand Down
38 changes: 38 additions & 0 deletions .kokoro/demo_result.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<testsuites timestamp='2019-06-13T19:04:59.740-07:00'>

<testsuite name="com.google.foo.FooTest" tests="1" failures="0" errors="0"
time="10.0" timestamp='2019-06-13T19:04:59.740-07:00'>
<properties>
<property name="SomeProperty" value="SomeValue"/>
</properties>
<!-- A test case that passed after 5 seconds -->
<testcase name="testThatPassed" classname="com.google.foo.FooTest"
time="5.0" timestamp='2019-06-13T19:05:44.740-07:00' status="run" result="completed">
<properties>
<property name="SomeProperty" value="SomeValue"/>
</properties>
<externallinks>
<externallink name="Lumbermill"
contact_email="lumbermill-team@google.com"
url="//lumbermill-domain/lumbermill"
component_id="137202"
description="Lumbermill integration"
foreground_color="#888888"
icon_name="lumbermill.ico"/>
</externallinks>
</testcase>

<!-- A test case that was skipped -->
<testcase name="skippedTest" classname="com.google.foo.BarTest"
time="0.0" timestamp='2019-06-13T19:05:49.740-07:00'>
<properties>
<property name="OldProperty" value="NewProperty"/>
</properties>
<skipped type="unittest.case.SkipTest"
message="FIXME - schema allows it but code throws an exception">
<![CDATA[SkipTest: FIXME - schema allows it but code throws an exception
]]>
</skipped>
</testcase>
</testsuite>
</testsuites>
7 changes: 7 additions & 0 deletions .kokoro/presubmit.cfg
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
build_file: "android-cuttlefish/.kokoro/public_test.sh"

action {
define_artifacts {
regex: "**/*sponge_log.xml" # Actually a glob, not a regex
regex: "**/*sponge_log.log"
}
}
13 changes: 13 additions & 0 deletions .kokoro/public_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,16 @@
set -e

echo "Cuttlefish debian package build and testing placeholder script for kokoro"

echo "current directory:"
pwd

echo "contents of github/android-cuttlefish"
ls github/android-cuttlefish

echo "producing placeholder xUnit test results"
mkdir -p test_results
cp github/android-cuttlefish/.kokoro/demo_result.xml test_results/sponge_log.xml
echo "placeholder log" > test_results/sponge_log.log

echo "done"

0 comments on commit 4b15cf8

Please sign in to comment.