blob: 78bd0b19104dd85cfc450cdd6b5df32eaf9a406f [file] [log] [blame]
Milo Lin0ddb7782022-08-17 20:40:43 -07001#include <chrono>
2#include "aos/configuration.h"
3#include "aos/events/logging/log_reader.h"
4#include "aos/events/logging/log_writer.h"
5#include "aos/events/simulated_event_loop.h"
6#include "aos/init.h"
7#include "aos/json_to_flatbuffer.h"
8#include "aos/network/team_number.h"
9#include "gflags/gflags.h"
10#include "gtest/gtest.h"
11
12DEFINE_string(config, "",
13 "Name of the config file to replay using.");
14/* This binary is used to validate that all of the
15 needed remote timestamps channels are in the config
16 to log the timestamps.
17 Future versions of the validator will provide the option
18 to confirm that the timestamps in the config are able to
19 replay all of the data in the log
20 This can be done by getting a list of all of the nodes and
21 iterating through it with a for loop creating a logger for
22 each one
23 Reference superstructure_lib_test.cc*/
24TEST(ConfigValidatorTest, ReadConfig) {
25 ASSERT_TRUE(!FLAGS_config.empty());
26 const aos::FlatbufferDetachedBuffer<aos::Configuration> config =
27 aos::configuration::ReadConfig(FLAGS_config);
28
29 aos::SimulatedEventLoopFactory factory(&config.message());
30
31 factory.RunFor(std::chrono::seconds(1));
32}