File tree Expand file tree Collapse file tree 7 files changed +54
-8
lines changed
java/com/facebook/hermes/test Expand file tree Collapse file tree 7 files changed +54
-8
lines changed Original file line number Diff line number Diff line change @@ -121,3 +121,35 @@ jobs:
121
121
# toLocaleLowerCase and toLocaleUpperCase are the two main ones.
122
122
# cmake --build ./build --target check-hermes
123
123
python3 hermes/utils/test_runner.py --test-intl test262/test -b build/bin ${{ matrix.test_runner_flags }}
124
+
125
+ test-android-e2e-intl :
126
+ strategy :
127
+ fail-fast : false
128
+ matrix :
129
+ os : [ubuntu-24.04]
130
+ abis : ["x86"]
131
+ runs-on : ${{ matrix.os }}
132
+ env :
133
+ HERMES_WS_DIR : /home/runner/work/hermes
134
+ ANDROID_NDK : /usr/local/lib/android/sdk/ndk/27.1.12297006
135
+ steps :
136
+ - name : Checkout Hermes
137
+
138
+ - name : Checkout Test262
139
+ run : |-
140
+ cd "$HERMES_WS_DIR"
141
+ git clone https://github.com/tc39/test262
142
+ cd test262
143
+ git checkout 62626e083bd506124aac6c799464d76c2c42851b
144
+ - name : Build Hermes Compiler
145
+ run : |-
146
+ cd "$HERMES_WS_DIR"
147
+ cmake -S hermes -B ./build -DCMAKE_BUILD_TYPE=Release
148
+ cmake --build ./build -j 4 --target hermesc
149
+ - name : Run android tests
150
+ uses : ReactiveCircus/android-emulator-runner@v2
151
+ with :
152
+ api-level : 29
153
+ cmake : 3.22.1
154
+ emulator-options : -timezone Europe/Paris -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
155
+ script : cd android && ./gradlew :intltest:prepareTests && ./gradlew -Pabis=${{ matrix.abis }} :intltest:connectedAndroidTest --stacktrace --debug
Original file line number Diff line number Diff line change @@ -314,6 +314,9 @@ endif()
314
314
if (HERMES_IS_MOBILE_BUILD )
315
315
add_definitions (-DHERMES_IS_MOBILE_BUILD )
316
316
endif ()
317
+ if (HERMES_PARSE_FLOW )
318
+ add_definitions (-DHERMES_PARSE_FLOW=1 )
319
+ endif ()
317
320
318
321
if (HERMESVM_INTERNAL_JAVASCRIPT_NATIVE )
319
322
add_definitions (-DHERMESVM_INTERNAL_JAVASCRIPT_NATIVE )
Original file line number Diff line number Diff line change @@ -28,8 +28,8 @@ buildscript {
28
28
// This is used as part of the Hermes build process
29
29
hermesC = " "
30
30
for (f in [
31
- " ${ hermesHostBuild} /build/ImportHermesc .cmake" ,
32
- " ${ hermesHostBuild} /build_release/ImportHermesc .cmake" ]) {
31
+ " ${ hermesHostBuild} /build/ImportHostCompilers .cmake" ,
32
+ " ${ hermesHostBuild} /build_release/ImportHostCompilers .cmake" ]) {
33
33
if (file(f). exists()) hermesC = f;
34
34
}
35
35
assert hermesC != " " : " Hermes host build not found"
Original file line number Diff line number Diff line change @@ -21,13 +21,14 @@ android {
21
21
cmake {
22
22
arguments " -DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON"
23
23
arguments " -DHERMES_IS_ANDROID=True"
24
+ arguments " -DHERMES_PARSE_FLOW=1"
24
25
arguments " -DHERMES_FACEBOOK_BUILD=${ rootProject.ext.facebookBuild} "
25
26
arguments " -DANDROID_STL=c++_shared"
26
27
arguments " -DANDROID_PIE=True"
27
- arguments " -DIMPORT_HERMESC =${ rootProject.ext.hermesC} "
28
+ arguments " -DIMPORT_HOST_COMPILERS =${ rootProject.ext.hermesC} "
28
29
arguments " -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=True"
29
30
arguments " -DHERMES_BUILD_SHARED_JSI=True"
30
- targets " libhermes "
31
+ targets " hermesvm_a "
31
32
}
32
33
}
33
34
ndk {
Original file line number Diff line number Diff line change @@ -20,6 +20,13 @@ buildDir.mkdirs()
20
20
21
21
def testDestination = " java/com/facebook/hermes/test/assets"
22
22
23
+ // Don't redirect logs.
24
+ tasks. withType(Test ) {
25
+ testLogging {
26
+ showStandardStreams = true
27
+ }
28
+ }
29
+
23
30
task prepareTests () {
24
31
doLast {
25
32
def test262Dir = file(rootProject. ext. fbsource). exists() ?
@@ -68,13 +75,14 @@ android {
68
75
externalNativeBuild {
69
76
cmake {
70
77
arguments " -DHERMES_IS_ANDROID=True"
78
+ arguments " -DHERMES_PARSE_FLOW=1"
71
79
arguments " -DHERMES_FACEBOOK_BUILD=${ rootProject.ext.facebookBuild} "
72
80
arguments " -DANDROID_STL=c++_shared"
73
81
arguments " -DANDROID_PIE=True"
74
- arguments " -DIMPORT_HERMESC =${ rootProject.ext.hermesC} "
82
+ arguments " -DIMPORT_HOST_COMPILERS =${ rootProject.ext.hermesC} "
75
83
arguments " -DHERMES_SLOW_DEBUG=False"
76
84
arguments " -DHERMES_ENABLE_INTL=True"
77
- targets " jsijni" , " jsijniepi" , " libhermes "
85
+ targets " jsijni" , " jsijniepi" , " hermesvm_a "
78
86
}
79
87
}
80
88
ndk {
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ if(HERMES_IS_ANDROID)
24
24
add_hermes_library (jsijni SHARED
25
25
${jni_source_files}
26
26
LINK_OBJLIBS
27
- hermesvm
27
+ hermesvm_a
28
28
hermesapi
29
29
compileJS
30
30
fbjni::fbjni
@@ -35,7 +35,7 @@ if(HERMES_IS_ANDROID)
35
35
add_hermes_library (jsijniepi SHARED
36
36
${epi_source_files}
37
37
LINK_OBJLIBS
38
- hermesvm
38
+ hermesvm_a
39
39
hermesapi
40
40
compileJS
41
41
fbjni::fbjni
Original file line number Diff line number Diff line change @@ -63,6 +63,7 @@ protected void evaluateCommonScriptsFromAsset(JSRuntime rt) throws IOException {
63
63
64
64
@ Test
65
65
public void test262Intl () throws IOException {
66
+ Log .v (LOG_TAG , "Enter test262Intl" );
66
67
Set <String > skipList = getSkipList ();
67
68
Stack <String > testFiles = new Stack <>();
68
69
testFiles .push ("test262/test" );
@@ -71,6 +72,7 @@ public void test262Intl() throws IOException {
71
72
ArrayList <String > ranTests = new ArrayList <>();
72
73
HashMap <String , String > failedTests = new HashMap <>();
73
74
75
+ Log .v (LOG_TAG , "Start run test loop" );
74
76
while (!testFiles .isEmpty ()) {
75
77
String path = testFiles .pop ();
76
78
String [] contents = assets .list (path );
You can’t perform that action at this time.
0 commit comments