aboutsummaryrefslogtreecommitdiff
path: root/contrib/kyua/engine/execenv
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/kyua/engine/execenv')
-rw-r--r--contrib/kyua/engine/execenv/execenv.cpp3
-rw-r--r--contrib/kyua/engine/execenv/execenv.hpp6
-rw-r--r--contrib/kyua/engine/execenv/execenv_fwd.hpp44
-rw-r--r--contrib/kyua/engine/execenv/execenv_host.hpp2
4 files changed, 47 insertions, 8 deletions
diff --git a/contrib/kyua/engine/execenv/execenv.cpp b/contrib/kyua/engine/execenv/execenv.cpp
index b043bcda52cb..663e293a33a7 100644
--- a/contrib/kyua/engine/execenv/execenv.cpp
+++ b/contrib/kyua/engine/execenv/execenv.cpp
@@ -35,9 +35,6 @@ namespace execenv = engine::execenv;
using utils::none;
-const char* execenv::default_execenv_name = "host";
-
-
/// List of registered execution environments, except default host one.
///
/// Use register_execenv() to add an entry to this global list.
diff --git a/contrib/kyua/engine/execenv/execenv.hpp b/contrib/kyua/engine/execenv/execenv.hpp
index e667ff205d85..d167196c7e98 100644
--- a/contrib/kyua/engine/execenv/execenv.hpp
+++ b/contrib/kyua/engine/execenv/execenv.hpp
@@ -32,6 +32,7 @@
#if !defined(ENGINE_EXECENV_EXECENV_HPP)
#define ENGINE_EXECENV_EXECENV_HPP
+#include "engine/execenv/execenv_fwd.hpp"
#include "model/test_program.hpp"
#include "utils/optional.ipp"
#include "utils/process/operations_fwd.hpp"
@@ -43,9 +44,6 @@ namespace engine {
namespace execenv {
-extern const char* default_execenv_name;
-
-
/// Abstract interface of an execution environment.
class interface {
protected:
@@ -85,7 +83,7 @@ public:
/// scheduler::interface::exec_test() or exec_cleanup().
///
/// \param args The arguments to pass to the binary.
- virtual void exec(const args_vector& args) const UTILS_NORETURN = 0;
+ virtual void exec [[noreturn]] (const args_vector& args) const = 0;
};
diff --git a/contrib/kyua/engine/execenv/execenv_fwd.hpp b/contrib/kyua/engine/execenv/execenv_fwd.hpp
new file mode 100644
index 000000000000..ddbb2c3bb40f
--- /dev/null
+++ b/contrib/kyua/engine/execenv/execenv_fwd.hpp
@@ -0,0 +1,44 @@
+// Copyright 2024 The Kyua Authors.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// * Neither the name of Google Inc. nor the names of its contributors
+// may be used to endorse or promote products derived from this software
+// without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/// \file engine/execenv/execenv_fwd.hpp
+/// Forward declarations for engine/execenv/execenv.hpp
+
+#if !defined(ENGINE_EXECENV_EXECENV_FWD_HPP)
+#define ENGINE_EXECENV_EXECENV_FWD_HPP
+
+#define DEFAULT_EXECENV_NAME "host"
+
+namespace engine {
+namespace execenv {
+
+
+} // namespace execenv
+} // namespace engine
+
+#endif // !defined(ENGINE_EXECENV_EXECENV_FWD_HPP)
diff --git a/contrib/kyua/engine/execenv/execenv_host.hpp b/contrib/kyua/engine/execenv/execenv_host.hpp
index 2742366cfd6f..3276ad210574 100644
--- a/contrib/kyua/engine/execenv/execenv_host.hpp
+++ b/contrib/kyua/engine/execenv/execenv_host.hpp
@@ -53,7 +53,7 @@ public:
void init() const;
void cleanup() const;
- void exec(const args_vector& args) const UTILS_NORETURN;
+ void exec [[noreturn]] (const args_vector& args) const;
};