Skip to content

Commit 91cd924

Browse files
author
huangtianhua
committed
Run python tests
1 parent 7a2ea58 commit 91cd924

File tree

5 files changed

+65
-3
lines changed

5 files changed

+65
-3
lines changed

.zuul.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
- project:
2+
name: theopenlab/spark
3+
check:
4+
jobs:
5+
- spark-build-and-python-test-arm64
6+
7+
- job:
8+
name: spark-build-and-python-test-arm64
9+
parent: init-test
10+
description: |
11+
The spark build and test other modules in openlab cluster.
12+
run: .zuul/playbooks/spark-build/run_python_tests.yaml
13+
nodeset: ubuntu-xenial-arm64
14+
timeout: 86400
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
- hosts: all
2+
tasks:
3+
- name: Build spark master using mvn with hadoop 2.7
4+
shell:
5+
cmd: |
6+
set -exo pipefail
7+
sudo apt-get update -y
8+
9+
# Install java
10+
sudo apt-get install default-jre -y
11+
sudo apt-get install default-jdk -y
12+
java_home=$(dirname $(dirname $(update-alternatives --list javac)))
13+
echo "export JAVA_HOME=${java_home}" >> ~/.profile
14+
echo "export PATH=${java_home}/bin:$PATH" >> ~/.profile
15+
source ~/.profile
16+
17+
# Install maven
18+
wget http://www.us.apache.org/dist/maven/maven-3/3.6.2/binaries/apache-maven-3.6.2-bin.tar.gz
19+
tar -xvf apache-maven-3.6.2-bin.tar.gz
20+
export PATH=$PWD/apache-maven-3.6.2/bin:$PATH
21+
22+
# fix kafka authfail tests
23+
sudo sed -i "s|127.0.0.1 $(hostname) localhost|127.0.0.1 localhost $(hostname)|" /etc/hosts
24+
25+
cd {{ ansible_user_dir }}/{{ zuul.project.src_dir }}
26+
27+
./build/mvn install package -DskipTests -Phadoop-2.7 -Pyarn -Phive -Phive-thriftserver -Pkinesis-asl -Pmesos
28+
29+
# use leveldbjni arm supporting jar
30+
wget https://repo1.maven.org/maven2/org/openlabtesting/leveldbjni/leveldbjni-all/1.8/leveldbjni-all-1.8.jar
31+
mvn install:install-file -DgroupId=org.fusesource.leveldbjni -DartifactId=leveldbjni-all -Dversion=1.8 -Dpackaging=jar -Dfile=leveldbjni-all-1.8.jar
32+
33+
# install packages needed
34+
pip install converage numpy
35+
# run python tests
36+
python/run-tests --python-executables=python3.5
37+
38+
chdir: '/home/zuul/src'
39+
executable: /bin/bash
40+
environment: '{{ global_env }}'

common/kvstore/pom.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,9 @@
4545
<artifactId>guava</artifactId>
4646
</dependency>
4747
<dependency>
48-
<groupId>org.fusesource.leveldbjni</groupId>
48+
<groupId>${leveldbjni.group}</groupId>
4949
<artifactId>leveldbjni-all</artifactId>
50+
<version>1.8</version>
5051
</dependency>
5152
<dependency>
5253
<groupId>com.fasterxml.jackson.core</groupId>

common/network-common/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
</dependency>
5353

5454
<dependency>
55-
<groupId>org.fusesource.leveldbjni</groupId>
55+
<groupId>${leveldbjni.group}</groupId>
5656
<artifactId>leveldbjni-all</artifactId>
5757
<version>1.8</version>
5858
</dependency>

pom.xml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@
241241
<spark.test.home>${session.executionRootDirectory}</spark.test.home>
242242

243243
<CodeCacheSize>1g</CodeCacheSize>
244+
<leveldbjni.group>org.fusesource.leveldbjni</leveldbjni.group>
244245
</properties>
245246
<repositories>
246247
<repository>
@@ -527,7 +528,7 @@
527528
<version>${commons.httpcore.version}</version>
528529
</dependency>
529530
<dependency>
530-
<groupId>org.fusesource.leveldbjni</groupId>
531+
<groupId>${leveldbjni.group}</groupId>
531532
<artifactId>leveldbjni-all</artifactId>
532533
<version>1.8</version>
533534
</dependency>
@@ -3127,5 +3128,11 @@
31273128
<profile>
31283129
<id>sparkr</id>
31293130
</profile>
3131+
<!--profile>
3132+
<id>aarch64</id>
3133+
<properties>
3134+
<leveldbjni.group>org.openlabtesting.leveldbjni</leveldbjni.group>
3135+
</properties>
3136+
</profile-->
31303137
</profiles>
31313138
</project>

0 commit comments

Comments
 (0)