Skip to content

Commit 6901212

Browse files
committed
use ${env.GRAALPY_VERSION} in standalone tests
1 parent df14f9a commit 6901212

File tree

6 files changed

+9
-26
lines changed

6 files changed

+9
-26
lines changed

graalpython/com.oracle.graal.python.test/src/tests/standalone/check_home_pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@ SOFTWARE.
5454
<dependency>
5555
<groupId>org.graalvm.polyglot</groupId>
5656
<artifactId>python-community</artifactId>
57-
<version>{graalpy-maven-plugin-version}</version>
57+
<version>${env.GRAALPY_VERSION}</version>
5858
<type>pom</type>
5959
</dependency>
6060
<dependency>
6161
<groupId>org.graalvm.python</groupId>
6262
<artifactId>python-launcher</artifactId>
63-
<version>{graalpy-maven-plugin-version}</version>
63+
<version>${env.GRAALPY_VERSION}</version>
6464
</dependency>
6565
</dependencies>
6666

@@ -69,7 +69,7 @@ SOFTWARE.
6969
<plugin>
7070
<groupId>org.graalvm.python</groupId>
7171
<artifactId>graalpy-maven-plugin</artifactId>
72-
<version>{graalpy-maven-plugin-version}</version>
72+
<version>${env.GRAALPY_VERSION}</version>
7373
<executions>
7474
<execution>
7575
<configuration>

graalpython/com.oracle.graal.python.test/src/tests/standalone/fail_without_graalpy_dep_pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ SOFTWARE.
5555
<plugin>
5656
<groupId>org.graalvm.python</groupId>
5757
<artifactId>graalpy-maven-plugin</artifactId>
58-
<version>{graalpy-maven-plugin-version}</version>
58+
<version>${env.GRAALPY_VERSION}</version>
5959
<executions>
6060
<execution>
6161
<goals>

graalpython/com.oracle.graal.python.test/src/tests/standalone/micronaut/hello/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<exec.mainClass>example.micronaut.Application</exec.mainClass>
2424

2525
<!-- graalpy -->
26-
<graalpy.version>{graalpy-maven-plugin-version}</graalpy.version>
26+
<graalpy.version>${env.GRAALPY_VERSION}</graalpy.version>
2727
<graalpy.edition>python-community</graalpy.edition>
2828

2929
</properties>

graalpython/com.oracle.graal.python.test/src/tests/standalone/prepare_venv_pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,13 @@ SOFTWARE.
6060
<dependency>
6161
<groupId>org.graalvm.polyglot</groupId>
6262
<artifactId>python-community</artifactId>
63-
<version>{graalpy-maven-plugin-version}</version>
63+
<version>${env.GRAALPY_VERSION}</version>
6464
<type>pom</type>
6565
</dependency>
6666
<dependency>
6767
<groupId>org.graalvm.python</groupId>
6868
<artifactId>python-launcher</artifactId>
69-
<version>{graalpy-maven-plugin-version}</version>
69+
<version>${env.GRAALPY_VERSION}</version>
7070
</dependency>
7171
</dependencies>
7272

@@ -75,7 +75,7 @@ SOFTWARE.
7575
<plugin>
7676
<groupId>org.graalvm.python</groupId>
7777
<artifactId>graalpy-maven-plugin</artifactId>
78-
<version>{graalpy-maven-plugin-version}</version>
78+
<version>${env.GRAALPY_VERSION}</version>
7979
<executions>
8080
<execution>
8181
<goals>

graalpython/com.oracle.graal.python.test/src/tests/standalone/test_micronaut.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,6 @@ def create_hello_app(hello_app_dir, target_dir):
6464
os.makedirs(os.path.dirname(target_file), exist_ok=True)
6565
shutil.copyfile(source_file, target_file)
6666

67-
pom = os.path.join(target_dir, "pom.xml")
68-
with open(pom, 'r') as f:
69-
lines = f.readlines()
70-
with open(pom, 'w') as f:
71-
for line in lines:
72-
if "{graalpy-maven-plugin-version}" in line:
73-
line = line.replace("{graalpy-maven-plugin-version}", util.get_graalvm_version())
74-
f.write(line)
75-
7667
def diff_texts(a, b, a_filename, b_filename):
7768
a = a.splitlines()
7869
b = b.splitlines()

graalpython/com.oracle.graal.python.test/src/tests/standalone/test_standalone.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -165,18 +165,10 @@ def generate_app(self, tmpdir, target_dir, target_name, pom_template=None):
165165
util.check_ouput("BUILD SUCCESS", out)
166166

167167
if pom_template:
168-
self.create_test_pom(pom_template, os.path.join(target_dir, "pom.xml"))
168+
shutil.copyfile(pom_template, os.path.join(target_dir, "pom.xml"))
169169

170170
util.patch_pom_repositories(os.path.join(target_dir, "pom.xml"))
171171

172-
def create_test_pom(self, template, pom):
173-
lines = open(template, 'r').readlines()
174-
with open(pom, 'w') as f:
175-
for line in lines:
176-
if "{graalpy-maven-plugin-version}" in line:
177-
line = line.replace("{graalpy-maven-plugin-version}", self.graalvmVersion)
178-
f.write(line)
179-
180172
@unittest.skipUnless(is_enabled, "ENABLE_STANDALONE_UNITTESTS is not true")
181173
def test_generated_app(self):
182174
with tempfile.TemporaryDirectory() as tmpdir:

0 commit comments

Comments
 (0)