Skip to content

Commit

Permalink
Refactor: move logger/ and os/ to runner/
Browse files Browse the repository at this point in the history
  • Loading branch information
fushar committed Sep 9, 2017
1 parent c4f7445 commit fc0ee3f
Show file tree
Hide file tree
Showing 57 changed files with 85 additions and 90 deletions.
31 changes: 15 additions & 16 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,6 @@ set(INCLUDE
include/tcframe/driver/SlugParser.hpp
include/tcframe/driver/SpecDriver.hpp
include/tcframe/driver/TestCaseDriver.hpp
include/tcframe/logger.hpp
include/tcframe/logger/BaseLogger.hpp
include/tcframe/logger/DefaultBaseLogger.hpp
include/tcframe/logger/LoggerEngine.hpp
include/tcframe/logger/SimpleLoggerEngine.hpp
include/tcframe/os.hpp
include/tcframe/os/ExecutionResult.hpp
include/tcframe/os/ExecutionRequest.hpp
include/tcframe/os/OperatingSystem.hpp
include/tcframe/os/TestCasePathCreator.hpp
include/tcframe/runner.hpp
include/tcframe/runner/aggregator.hpp
include/tcframe/runner/aggregator/Aggregator.hpp
Expand Down Expand Up @@ -103,7 +93,16 @@ set(INCLUDE
include/tcframe/runner/generator/GeneratorLogger.hpp
include/tcframe/runner/generator/TestCaseGenerator.hpp
include/tcframe/runner/logger.hpp
include/tcframe/runner/logger/BaseLogger.hpp
include/tcframe/runner/logger/DefaultBaseLogger.hpp
include/tcframe/runner/logger/LoggerEngine.hpp
include/tcframe/runner/logger/RunnerLogger.hpp
include/tcframe/runner/logger/SimpleLoggerEngine.hpp
include/tcframe/runner/os.hpp
include/tcframe/runner/os/ExecutionResult.hpp
include/tcframe/runner/os/ExecutionRequest.hpp
include/tcframe/runner/os/OperatingSystem.hpp
include/tcframe/runner/os/TestCasePathCreator.hpp
include/tcframe/runner/verdict.hpp
include/tcframe/runner/verdict/Verdict.hpp
include/tcframe/runner/verdict/VerdictCreator.hpp
Expand Down Expand Up @@ -174,11 +173,6 @@ set(TEST_UNIT
test/unit/tcframe/driver/TestCaseDriverTests.cpp
test/unit/tcframe/helper.hpp
test/unit/tcframe/mock.hpp
test/unit/tcframe/logger/DefaultBaseLogggerTests.cpp
test/unit/tcframe/logger/MockLoggerEngine.hpp
test/unit/tcframe/logger/SimpleLoggerEngineTests.cpp
test/unit/tcframe/os/MockOperatingSystem.hpp
test/unit/tcframe/os/TestCasePathCreatorTests.cpp
test/unit/tcframe/runner/aggregator/MinAggregatorTests.cpp
test/unit/tcframe/runner/aggregator/MockAggregator.hpp
test/unit/tcframe/runner/aggregator/MockAggregatorRegistry.hpp
Expand Down Expand Up @@ -212,8 +206,13 @@ set(TEST_UNIT
test/unit/tcframe/runner/grader/MockGraderLoggerFactory.hpp
test/unit/tcframe/runner/grader/MockTestCaseGrader.hpp
test/unit/tcframe/runner/grader/TestCaseGraderTests.cpp
test/unit/tcframe/runner/logger/DefaultBaseLogggerTests.cpp
test/unit/tcframe/runner/logger/MockRunnerLogger.hpp
test/unit/tcframe/runner/logger/MockLoggerEngine.hpp
test/unit/tcframe/runner/logger/RunnerLoggerTests.cpp
test/unit/tcframe/runner/logger/SimpleLoggerEngineTests.cpp
test/unit/tcframe/runner/os/MockOperatingSystem.hpp
test/unit/tcframe/runner/os/TestCasePathCreatorTests.cpp
test/unit/tcframe/runner/verdict/MockVerdictCreator.hpp
test/unit/tcframe/runner/verdict/VerdictCreatorTests.cpp
test/unit/tcframe/runner/verdict/VerdictTests.cpp
Expand Down Expand Up @@ -266,7 +265,7 @@ set(TEST_INTEGRATION
test/integration/tcframe/runner/evaluator/communicator/CommunicatorIntegrationTests.cpp
test/integration/tcframe/runner/evaluator/scorer/CustomScorerIntegrationTests.cpp
test/integration/tcframe/runner/evaluator/scorer/DiffScorerIntegrationTests.cpp
test/integration/tcframe/os/OperatingSystemIntegrationTests.cpp
test/integration/tcframe/runner/os/OperatingSystemIntegrationTests.cpp
)

add_executable(test_integration ${INCLUDE} ${TEST_INTEGRATION})
Expand Down
6 changes: 0 additions & 6 deletions include/tcframe/logger.hpp

This file was deleted.

6 changes: 0 additions & 6 deletions include/tcframe/os.hpp

This file was deleted.

1 change: 1 addition & 0 deletions include/tcframe/runner.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@
#include "tcframe/runner/generator.hpp"
#include "tcframe/runner/grader.hpp"
#include "tcframe/runner/logger.hpp"
#include "tcframe/runner/os.hpp"
#include "tcframe/runner/verdict.hpp"
2 changes: 1 addition & 1 deletion include/tcframe/runner/client/SpecClient.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <string>

#include "tcframe/driver.hpp"
#include "tcframe/os.hpp"
#include "tcframe/runner/os.hpp"
#include "tcframe/spec/testcase.hpp"

using std::string;
Expand Down
2 changes: 1 addition & 1 deletion include/tcframe/runner/core/Runner.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@

#include "Args.hpp"
#include "ArgsParser.hpp"
#include "tcframe/os.hpp"
#include "tcframe/runner/aggregator.hpp"
#include "tcframe/runner/client.hpp"
#include "tcframe/runner/evaluator.hpp"
#include "tcframe/runner/generator.hpp"
#include "tcframe/runner/grader.hpp"
#include "tcframe/runner/logger.hpp"
#include "tcframe/runner/os.hpp"
#include "tcframe/spec.hpp"
#include "tcframe/util.hpp"

Expand Down
2 changes: 1 addition & 1 deletion include/tcframe/runner/evaluator/BatchEvaluator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "Evaluator.hpp"
#include "GenerationResult.hpp"
#include "scorer.hpp"
#include "tcframe/os.hpp"
#include "tcframe/runner/os.hpp"
#include "tcframe/runner/verdict.hpp"
#include "tcframe/util.hpp"

Expand Down
2 changes: 1 addition & 1 deletion include/tcframe/runner/evaluator/EvaluationResult.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <string>
#include <tuple>

#include "tcframe/os.hpp"
#include "tcframe/runner/os.hpp"
#include "tcframe/runner/verdict.hpp"
#include "tcframe/util.hpp"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include <string>

#include "tcframe/os.hpp"
#include "tcframe/runner/os.hpp"
#include "tcframe/util.hpp"
#include "communicator.hpp"
#include "scorer.hpp"
Expand Down
2 changes: 1 addition & 1 deletion include/tcframe/runner/evaluator/EvaluatorRegistry.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "InteractiveEvaluator.hpp"
#include "communicator.hpp"
#include "scorer.hpp"
#include "tcframe/os.hpp"
#include "tcframe/runner/os.hpp"
#include "tcframe/runner/verdict.hpp"
#include "tcframe/spec.hpp"
#include "tcframe/util.hpp"
Expand Down
2 changes: 1 addition & 1 deletion include/tcframe/runner/evaluator/GenerationResult.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include <tuple>

#include "tcframe/os.hpp"
#include "tcframe/runner/os.hpp"
#include "tcframe/runner/verdict.hpp"
#include "tcframe/util.hpp"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include <tuple>

#include "tcframe/os.hpp"
#include "tcframe/runner/os.hpp"
#include "tcframe/runner/verdict.hpp"

using std::tie;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include "../EvaluationOptions.hpp"
#include "CommunicationResult.hpp"
#include "tcframe/os.hpp"
#include "tcframe/runner/os.hpp"
#include "tcframe/runner/verdict.hpp"
#include "tcframe/util.hpp"

Expand Down
2 changes: 1 addition & 1 deletion include/tcframe/runner/evaluator/scorer/CustomScorer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#include "Scorer.hpp"
#include "ScoringResult.hpp"
#include "tcframe/os.hpp"
#include "tcframe/runner/os.hpp"
#include "tcframe/runner/verdict.hpp"

using std::istream;
Expand Down
2 changes: 1 addition & 1 deletion include/tcframe/runner/evaluator/scorer/DiffScorer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#include "Scorer.hpp"
#include "ScoringResult.hpp"
#include "tcframe/os.hpp"
#include "tcframe/runner/os.hpp"
#include "tcframe/runner/verdict.hpp"
#include "tcframe/util.hpp"

Expand Down
2 changes: 1 addition & 1 deletion include/tcframe/runner/evaluator/scorer/ScoringResult.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include <tuple>

#include "tcframe/os.hpp"
#include "tcframe/runner/os.hpp"
#include "tcframe/runner/verdict.hpp"

using std::tie;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <vector>

#include "GeneratorLogger.hpp"
#include "tcframe/logger.hpp"
#include "tcframe/runner/logger.hpp"
#include "tcframe/spec/constraint.hpp"
#include "tcframe/spec/exception.hpp"
#include "tcframe/spec/verifier.hpp"
Expand Down
2 changes: 1 addition & 1 deletion include/tcframe/runner/generator/Generator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "GenerationOptions.hpp"
#include "GeneratorLogger.hpp"
#include "TestCaseGenerator.hpp"
#include "tcframe/os.hpp"
#include "tcframe/runner/os.hpp"
#include "tcframe/runner/client.hpp"
#include "tcframe/spec/core.hpp"
#include "tcframe/spec/exception.hpp"
Expand Down
2 changes: 1 addition & 1 deletion include/tcframe/runner/generator/GeneratorLogger.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <utility>
#include <vector>

#include "tcframe/logger.hpp"
#include "tcframe/runner/logger.hpp"
#include "tcframe/spec/constraint.hpp"
#include "tcframe/spec/exception.hpp"
#include "tcframe/spec/verifier.hpp"
Expand Down
2 changes: 1 addition & 1 deletion include/tcframe/runner/grader/BriefGraderLogger.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <map>

#include "GraderLogger.hpp"
#include "tcframe/logger.hpp"
#include "tcframe/runner/logger.hpp"
#include "tcframe/runner/verdict.hpp"

using std::map;
Expand Down
2 changes: 1 addition & 1 deletion include/tcframe/runner/grader/DefaultGraderLogger.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <map>

#include "GraderLogger.hpp"
#include "tcframe/logger.hpp"
#include "tcframe/runner/logger.hpp"
#include "tcframe/runner/verdict.hpp"
#include "tcframe/util.hpp"

Expand Down
2 changes: 1 addition & 1 deletion include/tcframe/runner/grader/Grader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "GradingOptions.hpp"
#include "GraderLogger.hpp"
#include "TestCaseGrader.hpp"
#include "tcframe/os.hpp"
#include "tcframe/runner/os.hpp"
#include "tcframe/runner/aggregator.hpp"
#include "tcframe/runner/client.hpp"
#include "tcframe/runner/verdict.hpp"
Expand Down
2 changes: 1 addition & 1 deletion include/tcframe/runner/grader/GraderLogger.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include <map>

#include "tcframe/logger.hpp"
#include "tcframe/runner/logger.hpp"
#include "tcframe/runner/verdict.hpp"
#include "tcframe/util.hpp"

Expand Down
2 changes: 1 addition & 1 deletion include/tcframe/runner/grader/GraderLoggerFactory.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "BriefGraderLogger.hpp"
#include "DefaultGraderLogger.hpp"
#include "GraderLogger.hpp"
#include "tcframe/logger.hpp"
#include "tcframe/runner/logger.hpp"

namespace tcframe {

Expand Down
4 changes: 4 additions & 0 deletions include/tcframe/runner/logger.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#pragma once

#include "tcframe/runner/logger/BaseLogger.hpp"
#include "tcframe/runner/logger/DefaultBaseLogger.hpp"
#include "tcframe/runner/logger/LoggerEngine.hpp"
#include "tcframe/runner/logger/RunnerLogger.hpp"
#include "tcframe/runner/logger/SimpleLoggerEngine.hpp"
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <map>
#include <string>

#include "tcframe/os.hpp"
#include "tcframe/runner/os.hpp"

using std::map;
using std::string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include "BaseLogger.hpp"
#include "LoggerEngine.hpp"
#include "tcframe/os.hpp"
#include "tcframe/runner/os.hpp"
#include "tcframe/spec/testcase.hpp"
#include "tcframe/util.hpp"

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion include/tcframe/runner/logger/RunnerLogger.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <string>
#include <vector>

#include "tcframe/logger.hpp"
#include "LoggerEngine.hpp"

using std::string;
using std::vector;
Expand Down
6 changes: 6 additions & 0 deletions include/tcframe/runner/os.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#pragma once

#include "tcframe/runner/os/ExecutionResult.hpp"
#include "tcframe/runner/os/ExecutionRequest.hpp"
#include "tcframe/runner/os/OperatingSystem.hpp"
#include "tcframe/runner/os/TestCasePathCreator.hpp"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion include/tcframe/runner/verdict/VerdictCreator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <sys/signal.h>

#include "Verdict.hpp"
#include "tcframe/os.hpp"
#include "tcframe/runner/os.hpp"
#include "tcframe/util.hpp"

using std::getline;
Expand Down
1 change: 0 additions & 1 deletion include/tcframe/spec/core/Magic.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include <string>
#include <vector>

#include "tcframe/logger.hpp"
#include "tcframe/spec/io.hpp"
#include "tcframe/spec/variable.hpp"
#include "tcframe/util.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include <cstdlib>

#include "tcframe/os/OperatingSystem.hpp"
#include "tcframe/runner/os/OperatingSystem.hpp"
#include "tcframe/util.hpp"

using ::testing::Eq;
Expand Down
2 changes: 1 addition & 1 deletion test/unit/tcframe/runner/client/SpecClientTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#include "../../util/TestUtils.hpp"
#include "../../driver/MockSpecDriver.hpp"
#include "../../os/MockOperatingSystem.hpp"
#include "../os/MockOperatingSystem.hpp"
#include "tcframe/runner/client/SpecClient.hpp"

using ::testing::_;
Expand Down
18 changes: 9 additions & 9 deletions test/unit/tcframe/runner/core/BaseRunnerTests.hpp
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
#include "gmock/gmock.h"
#include "../../mock.hpp"

#include "../../os/MockOperatingSystem.hpp"
#include "../../driver/MockDriver.hpp"
#include "../../runner/aggregator/MockAggregator.hpp"
#include "../../runner/aggregator/MockAggregatorRegistry.hpp"
#include "../../runner/evaluator/MockEvaluator.hpp"
#include "../../runner/evaluator/MockEvaluatorRegistry.hpp"
#include "../../runner/generator/MockGenerator.hpp"
#include "../../runner/grader/MockGrader.hpp"
#include "../../runner/grader/MockGraderLogger.hpp"
#include "../../runner/grader/MockGraderLoggerFactory.hpp"
#include "../aggregator/MockAggregator.hpp"
#include "../aggregator/MockAggregatorRegistry.hpp"
#include "../evaluator/MockEvaluator.hpp"
#include "../evaluator/MockEvaluatorRegistry.hpp"
#include "../generator/MockGenerator.hpp"
#include "../grader/MockGrader.hpp"
#include "../grader/MockGraderLogger.hpp"
#include "../grader/MockGraderLoggerFactory.hpp"
#include "../logger/MockRunnerLogger.hpp"
#include "../os/MockOperatingSystem.hpp"
#include "tcframe/runner/core/Runner.hpp"

using ::testing::_;
Expand Down
4 changes: 2 additions & 2 deletions test/unit/tcframe/runner/evaluator/BatchEvaluatorTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

#include <sstream>

#include "../../os/MockOperatingSystem.hpp"
#include "../../runner/verdict/MockVerdictCreator.hpp"
#include "../os/MockOperatingSystem.hpp"
#include "../verdict/MockVerdictCreator.hpp"
#include "scorer/MockScorer.hpp"
#include "tcframe/runner/evaluator/BatchEvaluator.hpp"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "gmock/gmock.h"
#include "../../mock.hpp"

#include "./communicator/MockCommunicator.hpp"
#include "communicator/MockCommunicator.hpp"
#include "tcframe/runner/evaluator/InteractiveEvaluator.hpp"

using ::testing::Eq;
Expand Down

0 comments on commit fc0ee3f

Please sign in to comment.