From 32d188f17b08840f4fde008f594fdeef9ff64a7b Mon Sep 17 00:00:00 2001 From: Bloop <13398309+vinylspiders@users.noreply.github.com> Date: Tue, 22 Aug 2023 17:18:58 -0400 Subject: [PATCH] [MISSED MIRROR] Include temporary library for getting sleeping procs (#77773) (#23258) * Include temporary library for getting sleeping procs (#77773) @LemonInTheDark wanted this to be able to hunt down the progress bar hard dels. Code is here: https://gist.github.com/Mothblocks/06b415afd75672fb03637804435350d2 Intended to be reverted once we figure out the issue, or if we realize it's not related. This library is not stable. * Update tgstation.dme --------- Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com> --- .github/workflows/run_integration_tests.yml | 1 + .gitignore | 3 +++ code/__HELPERS/byond_status.dm | 7 +++++++ code/modules/unit_tests/_unit_tests.dm | 1 + code/modules/unit_tests/byond_status.dm | 9 +++++++++ libbyond_sleeping_procs.so | Bin 0 -> 13836 bytes tgstation.dme | 1 + 7 files changed, 22 insertions(+) create mode 100644 code/__HELPERS/byond_status.dm create mode 100644 code/modules/unit_tests/byond_status.dm create mode 100644 libbyond_sleeping_procs.so diff --git a/.github/workflows/run_integration_tests.yml b/.github/workflows/run_integration_tests.yml index 0c4ba61a8a4..22cec5d48bb 100644 --- a/.github/workflows/run_integration_tests.yml +++ b/.github/workflows/run_integration_tests.yml @@ -63,6 +63,7 @@ jobs: tools/build/build --ci dm -DCIBUILDING -DANSICOLORS -WError -NWTG0001 - name: Run Tests run: | + cp libbyond_sleeping_procs.so ~/.byond/bin/libbyond_sleeping_procs.so source $HOME/BYOND/byond/bin/byondsetup bash tools/ci/run_server.sh ${{ inputs.map }} - name: Upload screenshot tests diff --git a/.gitignore b/.gitignore index 1c74dfcdf37..f8688c913d8 100644 --- a/.gitignore +++ b/.gitignore @@ -24,6 +24,9 @@ # Ignore compiled linux libs in the root folder, e.g. librust_g.so /*.so +# Remove when removing byond_status +!/libbyond_sleeping_procs.so + #Ignore compiled files and other files generated during compilation. *.mdme *.mdme.* diff --git a/code/__HELPERS/byond_status.dm b/code/__HELPERS/byond_status.dm new file mode 100644 index 00000000000..1985080418c --- /dev/null +++ b/code/__HELPERS/byond_status.dm @@ -0,0 +1,7 @@ +/// Returns the debug status, including sleeping procs. +/// If this blame is older than a month, please revert the PR that added it. +/proc/byond_status() + if (world.system_type == UNIX) + return LIBCALL("libbyond_sleeping_procs.so", "get_status")() + else + return "byond_status is not supported on [world.system_type]" diff --git a/code/modules/unit_tests/_unit_tests.dm b/code/modules/unit_tests/_unit_tests.dm index 227ef0b7079..074bff3152c 100644 --- a/code/modules/unit_tests/_unit_tests.dm +++ b/code/modules/unit_tests/_unit_tests.dm @@ -104,6 +104,7 @@ #include "bloody_footprints.dm" #include "breath.dm" #include "burning.dm" +#include "byond_status.dm" #include "cable_powernets.dm" #include "card_mismatch.dm" #include "cardboard_cutouts.dm" diff --git a/code/modules/unit_tests/byond_status.dm b/code/modules/unit_tests/byond_status.dm new file mode 100644 index 00000000000..e2788831556 --- /dev/null +++ b/code/modules/unit_tests/byond_status.dm @@ -0,0 +1,9 @@ +/// Tests the SUPPOSED TO BE TEMPORARY byond_status() proc for a useful format +/datum/unit_test/byond_status + +/datum/unit_test/byond_status/Run() + if (world.system_type != UNIX) + return + + var/status = byond_status() + TEST_ASSERT(findtext(status, "Sleeping procs"), "Invalid byond_status: [status]") diff --git a/libbyond_sleeping_procs.so b/libbyond_sleeping_procs.so new file mode 100644 index 0000000000000000000000000000000000000000..8596115fd9624a3434ebabdacb08264fef310e2f GIT binary patch literal 13836 zcmeHOO>7%Q6n;)zaH$EUR8VLR7K%{$GjR{aDa;C`({01aXG*dF;DvT zy>H%|nVq-xN;~`Zfkb~_AP^8Ot7VuaDsl0K@4F$jSg@^`;sT@ z?16}g#%1M9EWJbz%DQ^|fyO16u$xQ5(J(is+ zt7ysQixY59ICdF!dG9zQ?;ewr_&uF=hDf+u!?o`BPIhT1119|1119|1119|1119|111Ci$qcwJ^QqN6#Ai{8dnk-!j^@I= z3pvE6!5rNSM-}IjZH|o#bBeDa=V9R`#oNgviNO%>Wo#-ueZ-WVIx$L*Dk;? z)1UnK!c65P+NKkqqSsicKJRsyKFlc|WO#CW{h3Cib8IFtk2u#k<{m{NW)jD+;#upb z+jgaP)~Z-#ox?7RMMap6;qWwKLPxrJeWkjyHWTcq&9ryaNR5~bm<*T}oyI{9p*P_!d_jT-SsNb?)p`1%3s zF2^d{-izAAB=dL5IJ-v+*~p*oem89ROD74eZM}vY0DQlG@3*eI2p#^;b#3Tf&`&}4 ze($<`$Gsc+E$A`mPocRRK?&S5Ac1>Bfwkda@F4aMxC=ql(Vy?ErKc_QV9Ulcm+g8R z5nky5-}zTDAKzIo`Fks^EjPSfV-R;H?f~9E4Bulf#a#bz>qEiHvX+l)J%@Xa^l(IO zh;WDDY0RgdxM8#HS>O?0TLk`*7YU9`R3&WiCljzIT@h407f`pG!c( zYE55pp^z4=@?z+3e4M9!AcBLEGgRHVbbBlyZC(X~M^#RX4Vwx}5eM+sr|$#z*S9|b zu7&YW1AhOD;Qo5|4|Fgzn!5VR zDC^oMGATRf6z+_sr~a;Wgsu3{AeGpX>Ko|Unn-Qw9gx)K{u?*;^rvp@>l;iArG|Po z_9s%hTHY(2_tnh*ZF#<`pl|m4!y5fY5x&3vzEQR>QIzD{=@DqVikvhuV&V-FqX0fz~>Aqj`s_K_Y42L zI*$JlVnm-5d>CHI9XPUC z@dymSzYdN?$pJc!|9OIYcUp8DHy?G}Tm-oTKGH$ZI&L3qu7T@Q-x#4Bi0jaPYOZ%0 z;CPJVw<9MJr(@8hZ1Tqd9j6i(6S<554PgxNB)~Yhm0Sjc-_2;DPebR3zFQC%gM+s} lo)^bj3GmwLYY9^h#znrS(GZSBVLyLdxzpR1R8Aap+#iKEpKbsE literal 0 HcmV?d00001 diff --git a/tgstation.dme b/tgstation.dme index 0b877ad09b1..77070c6b29e 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -450,6 +450,7 @@ #include "code\__HELPERS\atoms.dm" #include "code\__HELPERS\auxtools.dm" #include "code\__HELPERS\bitflag_lists.dm" +#include "code\__HELPERS\byond_status.dm" #include "code\__HELPERS\cameras.dm" #include "code\__HELPERS\chat.dm" #include "code\__HELPERS\chat_filter.dm"