Skip to content

Commit

Permalink
Update tests and delete REPL code
Browse files Browse the repository at this point in the history
Reviewed By: willholen

Differential Revision: D21000367

fbshipit-source-id: 39942050234fb72f82160eb8ae09ac0a18452a0b
  • Loading branch information
neildhar authored and facebook-github-bot committed Apr 21, 2020
1 parent c946846 commit cc64ff9
Show file tree
Hide file tree
Showing 18 changed files with 11 additions and 732 deletions.
6 changes: 2 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,6 @@ list(APPEND HERMES_TEST_DEPS
interp-dispatch-bench
hdb
hbcdump
hermes-repl
hbc-attribute
hbc-deltaprep
hbc-diff
Expand All @@ -552,7 +551,6 @@ set(HERMES_LIT_TEST_PARAMS
hermesc=${HERMES_TOOLS_OUTPUT_DIR}/hermesc
hdb=${HERMES_TOOLS_OUTPUT_DIR}/hdb
hbcdump=${HERMES_TOOLS_OUTPUT_DIR}/hbcdump
repl=${HERMES_TOOLS_OUTPUT_DIR}/hermes-repl
hbc-deltaprep=${HERMES_TOOLS_OUTPUT_DIR}/hbc-deltaprep
hbc_diff=${HERMES_TOOLS_OUTPUT_DIR}/hbc-diff
build_mode=${HERMES_ASSUMED_BUILD_MODE_IN_LIT_TEST}
Expand Down Expand Up @@ -603,11 +601,11 @@ add_custom_target(make_bundle_dir DEPENDS ${HERMES_GITHUB_BUNDLE_DIR})
add_custom_command(
OUTPUT ${HERMES_GITHUB_DIR}/${HERMES_CLI_GITHUB_FILE}
WORKING_DIRECTORY ${HERMES_GITHUB_BUNDLE_DIR}
DEPENDS hermes hermesc hdb hbcdump hermes-repl make_bundle_dir
DEPENDS hermes hermesc hdb hbcdump make_bundle_dir
VERBATIM
COMMAND
# We need bin/hermes or Release/bin/hermes.exe in a predictable location
${CMAKE_COMMAND} -E copy $<TARGET_FILE:hermes> $<TARGET_FILE:hermes-repl> $<TARGET_FILE:hermesc> $<TARGET_FILE:hdb> $<TARGET_FILE:hbcdump> ${HERMES_GITHUB_EXTRAS} .
${CMAKE_COMMAND} -E copy $<TARGET_FILE:hermes> $<TARGET_FILE:hermesc> $<TARGET_FILE:hdb> $<TARGET_FILE:hbcdump> ${HERMES_GITHUB_EXTRAS} .
COMMAND
${CMAKE_COMMAND} -E tar zcf ${HERMES_GITHUB_DIR}/${HERMES_CLI_GITHUB_FILE} .
)
Expand Down
3 changes: 0 additions & 3 deletions include/hermes/CompilerDriver/CompilerDriver.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,6 @@ void printHermesCompilerVMVersion(llvm::raw_ostream &s);
/// Print the Hermes version (without VM) to the given stream \p s.
void printHermesCompilerVersion(llvm::raw_ostream &s);

/// Print the Hermes version for the REPL to the given stream \p s.
void printHermesREPLVersion(llvm::raw_ostream &s);

} // namespace driver
} // namespace hermes

Expand Down
2 changes: 1 addition & 1 deletion include/hermes/ConsoleHost/MemorySizeParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

/// This file defines flags that are specific to the Hermes runtime,
/// independent of the Hermes compiler. Such flags must be defined in the
/// hermes, hvm, and repl binaries, so this file is included in all of those.
/// hermes and hvm binaries, so this file is included in all of those.

namespace cl {

Expand Down
2 changes: 1 addition & 1 deletion include/hermes/ConsoleHost/RuntimeFlags.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

/// This file defines flags that are specific to the Hermes runtime,
/// independent of the Hermes compiler. Such flags must be defined in the
/// hermes, hvm, and repl binaries, so this file is included in all of those.
/// hermes and hvm binaries, so this file is included in all of those.

namespace cl {

Expand Down
4 changes: 1 addition & 3 deletions lib/CompilerDriver/CompilerDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1855,9 +1855,7 @@ void printHermesCompilerVMVersion(llvm::raw_ostream &s) {
void printHermesCompilerVersion(llvm::raw_ostream &s) {
printHermesVersion(s);
}
void printHermesREPLVersion(llvm::raw_ostream &s) {
printHermesVersion(s, " REPL", false);
}

OutputFormatKind outputFormatFromCommandLineOptions() {
return cl::DumpTarget;
}
Expand Down
3 changes: 0 additions & 3 deletions npm/hermes-engine-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,10 @@
"linux64-bin/hbcdump",
"linux64-bin/hdb",
"linux64-bin/hermes",
"linux64-bin/hermes-repl",
"linux64-bin/hermesc",
"osx-bin/hbcdump",
"osx-bin/hdb",
"osx-bin/hermes",
"osx-bin/hermes-repl",
"osx-bin/hermesc",
"win64-bin/icudt64.dll",
"win64-bin/icuin64.dll",
Expand All @@ -30,7 +28,6 @@
"win64-bin/vcruntime140.dll",
"win64-bin/hbcdump.exe",
"win64-bin/hdb.exe",
"win64-bin/hermes-repl.exe",
"win64-bin/hermes.exe",
"win64-bin/hermesc.exe"
]
Expand Down
1 change: 0 additions & 1 deletion test/lit.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,3 @@ config.substitutions.append(("%hdb", lit_config.params["hdb"].replace('\\', '/')
config.substitutions.append(("%hbcdump", lit_config.params["hbcdump"].replace('\\', '/')))
config.substitutions.append(("%hbc-deltaprep", lit_config.params["hbc_deltaprep"].replace('\\', '/')))
config.substitutions.append(("%hbc-diff", lit_config.params["hbc_diff"].replace('\\', '/')))
config.substitutions.append(("%repl", lit_config.params["repl"].replace('\\', '/')))
2 changes: 1 addition & 1 deletion test/repl/assignment.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.

// RUN: cat %s | %repl -prompt "" 2>&1 | %FileCheck --match-full-lines %s
// RUN: cat %s | %hermes -prompt="" 2>&1 | %FileCheck --match-full-lines %s

"assignment"
// CHECK-LABEL: "assignment"
Expand Down
2 changes: 1 addition & 1 deletion test/repl/multiline.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.

// RUN: cat %s | %repl -prompt "" -prompt2 "" | %FileCheck --match-full-lines %s
// RUN: cat %s | %hermes -prompt="" -prompt2="" | %FileCheck --match-full-lines %s

"multiline"
// CHECK-LABEL: "multiline"
Expand Down
2 changes: 1 addition & 1 deletion test/repl/pretty.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.

// RUN: cat %s | %repl -prompt "" -prompt2 "" | %FileCheck --match-full-lines %s
// RUN: cat %s | %hermes -prompt="" -prompt2="" | %FileCheck --match-full-lines %s

"pretty printer"
// CHECK-LABEL: "pretty printer"
Expand Down
2 changes: 1 addition & 1 deletion test/repl/regress-colors.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.

// RUN: cat %s | %repl -prompt "" -prompt2 "" | %FileCheck --match-full-lines %s
// RUN: cat %s | %hermes -prompt="" -prompt2="" | %FileCheck --match-full-lines %s

throw new SyntaxError();
// CHECK: SyntaxError
Expand Down
2 changes: 1 addition & 1 deletion test/repl/regress-mismatched.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.

// RUN: cat %s | %repl -prompt "" -prompt2 "" | %FileCheck --match-full-lines %s
// RUN: cat %s | %hermes -prompt="" -prompt2="" | %FileCheck --match-full-lines %s

new Set[1,2,3])
// CHECK: SyntaxError: 1:15:';' expected
Expand Down
2 changes: 1 addition & 1 deletion test/repl/wrapped-eval.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.

// RUN: cat %s | %repl -prompt "" | %FileCheck --match-full-lines %s
// RUN: cat %s | %hermes -prompt="" | %FileCheck --match-full-lines %s

"wrapped eval"
// CHECK-LABEL: "wrapped eval"
Expand Down
1 change: 0 additions & 1 deletion tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ add_subdirectory(hdb)
add_subdirectory(hbcdump)
add_subdirectory(hvm)
add_subdirectory(hvm-bench)
add_subdirectory(repl)
add_subdirectory(hbc-diff)
add_subdirectory(hbc-deltaprep)
add_subdirectory(hbc-attribute)
Expand Down
42 changes: 0 additions & 42 deletions tools/repl/CMakeLists.txt

This file was deleted.

19 changes: 0 additions & 19 deletions tools/repl/ReplConfig.h.in

This file was deleted.

Loading

0 comments on commit cc64ff9

Please sign in to comment.