Skip to content

Commit e3b43e9

Browse files
committed
CI work.
1 parent 7d6dd28 commit e3b43e9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

source/tests/main.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,12 @@ using namespace utility::types;
1919
#define OBJECT_FILE "test.obj"
2020
#define EXECUTABLE_FILE "test.exe"
2121
#define SYSTEM_STR "windows"
22+
#define EXECUTABLE_OPT ""
2223
#else
2324
#define OBJECT_FILE "test.o"
2425
#define EXECUTABLE_FILE "test"
2526
#define SYSTEM_STR "linux"
27+
#define EXECUTABLE_OPT "./"
2628
#endif
2729

2830

@@ -64,7 +66,7 @@ auto get_pretty_path(const filepath& path) -> filepath {
6466

6567
auto compile_file(const filepath& path, const filepath& compiler_path) -> bool {
6668
const std::string compilation_command = std::format("{} compile {} -e {} --system {} > {} 2> {}", compiler_path, path, OBJECT_FILE, SYSTEM_STR, COMPILER_STDOUT, COMPILER_STDERR);
67-
const std::string link_command = std::format("clang -o {} {}", EXECUTABLE_FILE, OBJECT_FILE);
69+
const std::string link_command = std::format("clang {} -o {} ", OBJECT_FILE, EXECUTABLE_FILE);
6870

6971
// compile the source file
7072
if(utility::shell::execute(compilation_command) != 0) {
@@ -94,7 +96,7 @@ auto compile_file(const filepath& path, const filepath& compiler_path) -> bool {
9496
}
9597

9698
auto run_executable(const filepath& path) -> i32 {
97-
const std::string command = std::format("{} > {} 2> {}", path, APP_STDOUT, APP_STDERR);
99+
const std::string command = std::format("{}{} > {} 2> {}", EXECUTABLE_OPT, path, APP_STDOUT, APP_STDERR);
98100
return utility::shell::execute(command);
99101
}
100102

0 commit comments

Comments
 (0)