diff options
| author | rfresh2 <89827146+rfresh2@users.noreply.github.com> | 2025-10-06 12:10:56 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-06 21:10:56 +0200 |
| commit | 73f06434a43c75b3a81e31a6ed7586a14a9c7a48 (patch) | |
| tree | 0bb1a5ace48f8f17859583f59eb39b9787283273 /hyprtester/src/tests/main/exec.cpp | |
| parent | 17e77e0407bebd5d24521012ee1d04b156d6b9f4 (diff) | |
keybinds: fix repeat and long press keybinds release (#11863)
Diffstat (limited to 'hyprtester/src/tests/main/exec.cpp')
| -rw-r--r-- | hyprtester/src/tests/main/exec.cpp | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/hyprtester/src/tests/main/exec.cpp b/hyprtester/src/tests/main/exec.cpp index a475ac0d..fd42cf06 100644 --- a/hyprtester/src/tests/main/exec.cpp +++ b/hyprtester/src/tests/main/exec.cpp @@ -15,16 +15,6 @@ using namespace Hyprutils::Memory; #define UP CUniquePointer #define SP CSharedPointer -static std::string execAndGet(const std::string& cmd) { - CProcess proc("/bin/sh", {"-c", cmd}); - - if (!proc.runSync()) { - return "error"; - } - - return proc.stdOut(); -} - static bool test() { NLog::log("{}Testing process spawning", Colors::GREEN); @@ -33,7 +23,7 @@ static bool test() { OK(getFromSocket("/dispatch exec sleep 1")); // Ensure that sleep is our child - const std::string sleepPidS = execAndGet("pgrep sleep"); + const std::string sleepPidS = Tests::execAndGet("pgrep sleep"); pid_t sleepPid; try { sleepPid = std::stoull(sleepPidS); @@ -42,7 +32,7 @@ static bool test() { return false; } - const std::string sleepParentComm = execAndGet("cat \"/proc/$(ps -o ppid:1= -p " + sleepPidS + ")/comm\""); + const std::string sleepParentComm = Tests::execAndGet("cat \"/proc/$(ps -o ppid:1= -p " + sleepPidS + ")/comm\""); NLog::log("{}Expecting that sleep's parent is Hyprland", Colors::YELLOW); EXPECT_CONTAINS(sleepParentComm, "Hyprland"); |
