1 /* 2 SPDX-FileCopyrightText: 2013 Ivan Cukic <ivan.cukic(at)kde.org> 3 4 SPDX-License-Identifier: GPL-2.0-or-later 5 */ 6 7 #ifndef PROCESS_H 8 #define PROCESS_H 9 10 #include <common/test.h> 11 12 #include <controller.h> 13 14 class QProcess; 15 class QTemporaryDir; 16 17 namespace Process 18 { 19 enum Action { 20 Start, 21 Stop, 22 Kill, 23 Crash, 24 }; 25 26 class Modifier : public Test 27 { 28 Q_OBJECT 29 public: 30 Modifier(Action action); 31 32 private Q_SLOTS: 33 void initTestCase(); 34 void testProcess(); 35 void cleanupTestCase(); 36 37 private: 38 Action m_action; 39 static QProcess *s_process; 40 static QTemporaryDir *s_tempDir; 41 }; 42 43 Modifier *exec(Action action); 44 45 } // namespace Process 46 47 #endif /* PROCESS_H */ 48