From 73f06434a43c75b3a81e31a6ed7586a14a9c7a48 Mon Sep 17 00:00:00 2001 From: rfresh2 <89827146+rfresh2@users.noreply.github.com> Date: Mon, 6 Oct 2025 12:10:56 -0700 Subject: keybinds: fix repeat and long press keybinds release (#11863) --- hyprtester/src/tests/main/exec.cpp | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'hyprtester/src/tests/main/exec.cpp') 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"); -- cgit v1.2.3