From 6af1e3ba628e1d9e95e2cbec761db55504720656 Mon Sep 17 00:00:00 2001 From: Tingan Ho Date: Sat, 26 Nov 2016 15:53:12 +0100 Subject: [PATCH] Adds clean task --- .travis.yml | 4 ++-- CMakeLists.txt | 9 ++++++--- Source/Extensions/{ => JavaScript}/Extension.json | 2 +- Source/Extensions/JavaScript/dep-test | 1 + Source/Program/CommandParser.cpp | 1 - Source/Program/Utils.cpp | 2 +- Source/Vendors/yaml-cpp | 1 - Tasks/Clean.cpp | 7 ++++++- 8 files changed, 17 insertions(+), 10 deletions(-) rename Source/Extensions/{ => JavaScript}/Extension.json (84%) create mode 100644 Source/Extensions/JavaScript/dep-test delete mode 160000 Source/Vendors/yaml-cpp diff --git a/.travis.yml b/.travis.yml index 88bd6d4c..cb513f17 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,8 +14,8 @@ git: # Use sed to replace the SSH URL with the public URL, then initialize submodules. before_install: - - sed -i 's/git@github.com:/https:\/\/github.com\//' .gitmodules - - git submodule update --init --recursive + - sed -i 's/git@github.com:/https:\/\/github.com\//' .gitmodules + - git submodule update --init --recursive matrix: include: diff --git a/CMakeLists.txt b/CMakeLists.txt index 128f1b2f..f520d447 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,14 +19,17 @@ include_directories("${PROJECT_SOURCE_DIR}/Source/Vendors/Glob") include_directories("${PROJECT_SOURCE_DIR}/Source/Vendors/json/src") add_executable(l10ns ${PROJECT_SOURCE_DIR}/Source/Program/Exec.cpp) -add_executable(run-tests ${PROJECT_SOURCE_DIR}/Source/TestFramework/Exec.cpp) add_executable(accept-baseline ${PROJECT_SOURCE_DIR}/Tasks/AcceptBaseline.cpp) +add_executable(clean-project ${PROJECT_SOURCE_DIR}/Tasks/Clean.cpp) add_executable(diff ${PROJECT_SOURCE_DIR}/Tasks/Diff.cpp) add_executable(generate-diagnostics ${PROJECT_SOURCE_DIR}/Tasks/GenerateDiagnostics.cpp) +add_executable(run-tests ${PROJECT_SOURCE_DIR}/Source/TestFramework/Exec.cpp) target_link_libraries(l10ns glob ${Boost_LIBRARIES}) -target_link_libraries(run-tests glob ${Boost_LIBRARIES}) + target_link_libraries(accept-baseline glob ${Boost_LIBRARIES}) -target_link_libraries(generate-diagnostics glob ${Boost_LIBRARIES}) +target_link_libraries(clean-project glob ${Boost_LIBRARIES}) target_link_libraries(diff glob ${Boost_LIBRARIES}) +target_link_libraries(generate-diagnostics glob ${Boost_LIBRARIES}) +target_link_libraries(run-tests glob ${Boost_LIBRARIES}) diff --git a/Source/Extensions/Extension.json b/Source/Extensions/JavaScript/Extension.json similarity index 84% rename from Source/Extensions/Extension.json rename to Source/Extensions/JavaScript/Extension.json index ec0ca7f4..6bb004c1 100644 --- a/Source/Extensions/Extension.json +++ b/Source/Extensions/JavaScript/Extension.json @@ -7,6 +7,6 @@ "Date", "Number" ], - "DependencyTest": "bin/dep-test", + "DependencyTest": "dep-test", "Execute": "node bin/l10ns-ts.js" } \ No newline at end of file diff --git a/Source/Extensions/JavaScript/dep-test b/Source/Extensions/JavaScript/dep-test new file mode 100644 index 00000000..4f5e2fb5 --- /dev/null +++ b/Source/Extensions/JavaScript/dep-test @@ -0,0 +1 @@ +node --version diff --git a/Source/Program/CommandParser.cpp b/Source/Program/CommandParser.cpp index b8512d4a..4fb32182 100644 --- a/Source/Program/CommandParser.cpp +++ b/Source/Program/CommandParser.cpp @@ -151,5 +151,4 @@ Command* parse_command_args(int argc, char* argv[]) { return command; } - } // L10ns diff --git a/Source/Program/Utils.cpp b/Source/Program/Utils.cpp index ab931df7..e13be6ab 100644 --- a/Source/Program/Utils.cpp +++ b/Source/Program/Utils.cpp @@ -219,7 +219,7 @@ bool copy_folder(fs::path const & source, fs::path const & destination) { } } catch (fs::filesystem_error const & e) { - std:: cerr << e.what() << '\n'; + cerr << e.what() << '\n'; } } return true; diff --git a/Source/Vendors/yaml-cpp b/Source/Vendors/yaml-cpp deleted file mode 160000 index b57efe94..00000000 --- a/Source/Vendors/yaml-cpp +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b57efe94e7d445713c29f863adb8c23438eaa217 diff --git a/Tasks/Clean.cpp b/Tasks/Clean.cpp index 970e1507..b704c9b6 100644 --- a/Tasks/Clean.cpp +++ b/Tasks/Clean.cpp @@ -1,4 +1,9 @@ -int main() { +#include "Utils.cpp" +#include "Configurations.h" + +using namespace L10ns; +int main() { + remove_all(PROJECT_DIR "Tests/Current"); }