Add fastcheck

This commit is contained in:
Aoran Zeng 2024-09-04 19:48:19 +08:00
parent f211b72691
commit ca9f827d0f
No known key found for this signature in database
GPG Key ID: 8F8BA8488E10ED98
2 changed files with 14 additions and 4 deletions

View File

@ -1,10 +1,10 @@
# ------------------------------------------------------------
# SPDX-License-Identifier: GPL-3.0-or-later
# -------------------------------------------------------------
# File : Makefile
# Authors : Aoran Zeng <ccmywish@qq.com>
# Created on : <2023-08-28>
# Last modified : <2024-06-05>
# Build File : Makefile
# File Authors : Aoran Zeng <ccmywish@qq.com>
# Created On : <2023-08-28>
# Last Modified : <2024-09-04>
# ---------------------------------------------------------------
CFLAGS = -Iinclude # -Wall
@ -35,6 +35,9 @@ CI: all
test: $(Target)
@perl ./test/cli.pl
fastcheck: $(Target)
@perl ./test/cli.pl fastcheck
test-xy:
@$(CC) test/xy.c $(CFLAGS) -o xy
@./xy

View File

@ -41,6 +41,13 @@ like `./chsrc get -no-color 2>&1`, $get_null, 'chsrc get -no-color';
my $fake_target_name = qr/暂不支持的换源目标/;
like `./chsrc get fake_target_name 2>&1`, $fake_target_name, 'chsrc get fake_target_name';
if ($ARGV[0] eq 'fastcheck') {
say "Fast checking, done testing.";
done_testing;
exit 0;
}
my $has_ruby = system 'ruby1 -v';
if ($has_ruby == 0) {
say "Ruby exists. Go on testing.";