@@ -29,6 +29,10 @@ workflows:
2929 run_linux_tests : << pipeline.parameters.run_linux_tests >>
3030 requires :
3131 - linux-build-and-unit-test
32+ - linux-presto-native-tests :
33+ run_linux_tests : << pipeline.parameters.run_linux_tests >>
34+ requires :
35+ - linux-build-and-unit-test
3236 - linux-spark-e2e-tests :
3337 run_linux_tests : << pipeline.parameters.run_linux_tests >>
3438 requires :
@@ -193,6 +197,54 @@ jobs:
193197 - store_artifacts :
194198 path : ' /tmp/PrestoNativeQueryRunnerUtils'
195199
200+ linux-presto-native-tests :
201+ executor : build
202+ parameters :
203+ run_linux_tests :
204+ type : boolean
205+ default : false
206+ parallelism : 5
207+ steps :
208+ - run : echo "Run Linux tests is << parameters.run_linux_tests >>"
209+ - when :
210+ condition : << parameters.run_linux_tests >>
211+ steps :
212+ - checkout
213+ - attach_workspace :
214+ at : presto-native-tests
215+ - maven_install :
216+ maven_install_opts : ${MAVEN_INSTALL_OPTS}
217+ maven_fast_install : ${MAVEN_FAST_INSTALL}
218+ - run :
219+ name : ' Run Presto native tests'
220+ command : |
221+ export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib:/usr/local/lib64"
222+ export PRESTO_SERVER_PATH="${HOME}/project/presto-native-execution/_build/debug/presto_cpp/main/presto_server"
223+ export TEMP_PATH="/tmp"
224+ TESTFILES=$(circleci tests glob "presto-native-tests/src/test/**/Test*.java" | circleci tests split --split-by=timings)
225+ # Convert file paths to comma separated class names
226+ export TESTCLASSES=
227+ for test_file in $TESTFILES
228+ do
229+ tmp=${test_file##*/}
230+ test_class=${tmp%%\.*}
231+ export TESTCLASSES="${TESTCLASSES},$test_class"
232+ done
233+ export TESTCLASSES=${TESTCLASSES#,}
234+
235+ if [ ! -z $TESTCLASSES ]; then
236+ mvn test \
237+ ${MAVEN_TEST} \
238+ -pl 'presto-native-tests' \
239+ -Dtest="${TESTCLASSES}" \
240+ -DPRESTO_SERVER=${PRESTO_SERVER_PATH} \
241+ -DDATA_DIR=${TEMP_PATH} \
242+ -Duser.timezone=America/Bahia_Banderas \
243+ -T1C
244+ fi
245+ - store_artifacts :
246+ path : ' /tmp/PrestoNativeTestsUtils'
247+
196248 linux-spark-e2e-tests :
197249 executor : build
198250 parameters :
0 commit comments