mirror of
https://github.com/FeralInteractive/gamemode.git
synced 2025-06-07 08:07:20 +02:00
Add -t
option to run tests on self
Right now only prints
This commit is contained in:
parent
6544bfb99d
commit
951cf1f8b9
@ -67,6 +67,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||||||
" -d daemonize self after launch\n" \
|
" -d daemonize self after launch\n" \
|
||||||
" -l log to syslog\n" \
|
" -l log to syslog\n" \
|
||||||
" -r request gamemode and pause\n" \
|
" -r request gamemode and pause\n" \
|
||||||
|
" -t run tests on self\n" \
|
||||||
" -h print this help\n" \
|
" -h print this help\n" \
|
||||||
" -v print version\n" \
|
" -v print version\n" \
|
||||||
"\n" \
|
"\n" \
|
||||||
@ -96,7 +97,7 @@ int main(int argc, char *argv[])
|
|||||||
bool daemon = false;
|
bool daemon = false;
|
||||||
bool use_syslog = false;
|
bool use_syslog = false;
|
||||||
int opt = 0;
|
int opt = 0;
|
||||||
while ((opt = getopt(argc, argv, "dlsrvh")) != -1) {
|
while ((opt = getopt(argc, argv, "dlsrtvh")) != -1) {
|
||||||
switch (opt) {
|
switch (opt) {
|
||||||
case 'd':
|
case 'd':
|
||||||
daemon = true;
|
daemon = true;
|
||||||
@ -140,6 +141,10 @@ int main(int argc, char *argv[])
|
|||||||
// Simply pause and wait for any signal
|
// Simply pause and wait for any signal
|
||||||
pause();
|
pause();
|
||||||
|
|
||||||
|
exit(EXIT_SUCCESS);
|
||||||
|
break;
|
||||||
|
case 't':
|
||||||
|
fprintf(stdout, "Running tests...\n");
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
break;
|
break;
|
||||||
case 'v':
|
case 'v':
|
||||||
|
Loading…
x
Reference in New Issue
Block a user