summaryrefslogtreecommitdiffhomepage
path: root/tools/StepsTool.cc
blob: ccad634cbdaa1aa44d22d504825d8e83b506c758 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/* ===========================================================

  Copyright (C) 2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license

=========================================================== */

#include <io/print.hpp>
#include <steps/steps.hpp>

/// =========================================================== ///
/// Use operators from steps namespace to compare steps records.
/// =========================================================== ///
using namespace ocl::steps::operators;

const auto kStepsFileRoot = "/system/install.stp";

/// =========================================================== ///
/// @brief Main function for running steps on NeKernel.
/// =========================================================== ///
int main(void) {
  ocl::io::print("steps: running steps for program...\n");

  std::ifstream file(kStepsFileRoot);
  ocl::steps::record steps;

  file >> steps;

  if (!ocl::steps::is_valid(steps))
    return EXIT_FAILURE;

  /// AMLALE: Read steps from file and process them.

  ocl::io::print("steps: done.\n");

  return EXIT_SUCCESS;
}