Skip to content

Commit b51dde1

Browse files
committed
use gradle wrapper in standalone tests
1 parent e19ade0 commit b51dde1

11 files changed

Lines changed: 505 additions & 94 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,4 @@ graalpython/com.oracle.graal.python.test/src/tests/standalone/micronaut/hello/ta
9393
graalpython/com.oracle.graal.python.test/src/tests/cpyext/build/
9494
pom-mx.xml
9595
.venv
96+
!graalpython/com.oracle.graal.python.test/src/tests/standalone/gradle/gradle-test-project/gradle/wrapper/gradle-wrapper.jar

ci.jsonnet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{ "overlay": "f34208d23ccb4436fd16a9e61d0fdbeb12fcb14e" }
1+
{ "overlay": "e7178928f1228c996d4facc3294d5144f7a33776" }

graalpython/com.oracle.graal.python.test/src/graalpytest.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -854,6 +854,16 @@ class TextTestResult :
854854
class TestSuite:
855855
pass
856856

857+
def removeAttr(cls, attr):
858+
if(cls is object):
859+
return
860+
if hasattr(cls, attr):
861+
try:
862+
delattr(cls, attr)
863+
except AttributeError as e:
864+
pass
865+
for b in cls.__bases__:
866+
removeAttr(b, attr)
857867

858868
def skip_deselected_test_functions(globals):
859869
"""
@@ -876,7 +886,7 @@ def skip_deselected_test_functions(globals):
876886
if idx % total != batch - 1:
877887
n = test_func.__name__
878888
if isinstance(owner, type):
879-
delattr(owner, n)
889+
removeAttr(owner, n)
880890
else:
881891
del owner[n]
882892

graalpython/com.oracle.graal.python.test/src/tests/standalone/gradle/build/build.gradle.kts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ application {
1313
mainClass = "org.example.GraalPy"
1414
}
1515

16-
// XXX how to run with asserts on, aka -ea?
17-
//run {
18-
// enableAssertions = true
19-
//}
2016
val r = tasks.run.get()
2117
r.enableAssertions = true
2218
r.outputs.upToDateWhen {false}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https://services.gradle.org/distributions/gradle-8.9-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
6+
zipStoreBase=GRADLE_USER_HOME
7+
zipStorePath=wrapper/dists

graalpython/com.oracle.graal.python.test/src/tests/standalone/gradle/gradle-test-project/gradlew

Lines changed: 249 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

graalpython/com.oracle.graal.python.test/src/tests/standalone/gradle/gradle-test-project/gradlew.bat

Lines changed: 92 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)