1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-12 00:54:02 -05:00

Rename test targets (#2262)

This commit is contained in:
Bartek Iwańczuk 2019-05-01 15:48:56 +02:00 committed by Ryan Dahl
parent 7237e9d34a
commit 8978870808
6 changed files with 13 additions and 13 deletions

View file

@ -131,6 +131,6 @@ jobs:
# Call gn gen again to make sure new args are recognized. # Call gn gen again to make sure new args are recognized.
- third_party/depot_tools/gn gen target/debug - third_party/depot_tools/gn gen target/debug
- export ASAN_OPTIONS=detect_leaks=1 - export ASAN_OPTIONS=detect_leaks=1
- ./tools/build.py test_cc - ./tools/build.py libdeno_test
- ./target/debug/test_cc - ./target/debug/libdeno_test

View file

@ -4,10 +4,10 @@ group("default") {
testonly = true testonly = true
deps = [ deps = [
":hyper_hello", ":hyper_hello",
"cli:cli_test",
"cli:deno", "cli:deno",
"cli:test_rs",
"core:default", "core:default",
"core/libdeno:test_cc", "core/libdeno:libdeno_test",
] ]
} }

View file

@ -162,7 +162,7 @@ rust_executable("deno") {
] ]
} }
rust_test("test_rs") { rust_test("cli_test") {
source_root = "main.rs" source_root = "main.rs"
extern = main_extern extern = main_extern
deps = [ deps = [

View file

@ -80,7 +80,7 @@ v8_executable("snapshot_creator") {
configs = [ ":deno_config" ] configs = [ ":deno_config" ]
} }
v8_executable("test_cc") { v8_executable("libdeno_test") {
testonly = true testonly = true
sources = [ sources = [
"file_util_test.cc", "file_util_test.cc",

View file

@ -38,7 +38,7 @@ TEST(FileUtilTest, ExePath) {
EXPECT_TRUE(exe_path.find("/") == 0 || exe_path.find(":\\") == 1); EXPECT_TRUE(exe_path.find("/") == 0 || exe_path.find(":\\") == 1);
// FIlename is the name of the test binary. // FIlename is the name of the test binary.
std::string exe_filename = deno::Basename(exe_path); std::string exe_filename = deno::Basename(exe_path);
EXPECT_EQ(exe_filename.find("test_cc"), 0u); EXPECT_EQ(exe_filename.find("libdeno_test"), 0u);
// Path exists (also tests ReadFileToString). // Path exists (also tests ReadFileToString).
std::string contents; std::string contents;
EXPECT_TRUE(deno::ReadFileToString(exe_path.c_str(), &contents)); EXPECT_TRUE(deno::ReadFileToString(exe_path.c_str(), &contents));

View file

@ -74,13 +74,13 @@ def main(argv):
"tools/ts_library_builder/test.ts" "tools/ts_library_builder/test.ts"
]) ])
test_cc = os.path.join(build_dir, "test_cc" + executable_suffix) libdeno_test = os.path.join(build_dir, "libdeno_test" + executable_suffix)
check_exists(test_cc) check_exists(libdeno_test)
run([test_cc]) run([libdeno_test])
test_rs = os.path.join(build_dir, "test_rs" + executable_suffix) cli_test = os.path.join(build_dir, "cli_test" + executable_suffix)
check_exists(test_rs) check_exists(cli_test)
run([test_rs]) run([cli_test])
deno_core_test = os.path.join(build_dir, deno_core_test = os.path.join(build_dir,
"deno_core_test" + executable_suffix) "deno_core_test" + executable_suffix)