mirror of
https://github.com/RubyMetric/chsrc.git
synced 2024-11-22 12:05:40 +08:00
Add fastcheck
This commit is contained in:
parent
f211b72691
commit
ca9f827d0f
11
Makefile
11
Makefile
|
@ -1,10 +1,10 @@
|
||||||
# ------------------------------------------------------------
|
# ------------------------------------------------------------
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
# -------------------------------------------------------------
|
# -------------------------------------------------------------
|
||||||
# File : Makefile
|
# Build File : Makefile
|
||||||
# Authors : Aoran Zeng <ccmywish@qq.com>
|
# File Authors : Aoran Zeng <ccmywish@qq.com>
|
||||||
# Created on : <2023-08-28>
|
# Created On : <2023-08-28>
|
||||||
# Last modified : <2024-06-05>
|
# Last Modified : <2024-09-04>
|
||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
|
|
||||||
CFLAGS = -Iinclude # -Wall
|
CFLAGS = -Iinclude # -Wall
|
||||||
|
@ -35,6 +35,9 @@ CI: all
|
||||||
test: $(Target)
|
test: $(Target)
|
||||||
@perl ./test/cli.pl
|
@perl ./test/cli.pl
|
||||||
|
|
||||||
|
fastcheck: $(Target)
|
||||||
|
@perl ./test/cli.pl fastcheck
|
||||||
|
|
||||||
test-xy:
|
test-xy:
|
||||||
@$(CC) test/xy.c $(CFLAGS) -o xy
|
@$(CC) test/xy.c $(CFLAGS) -o xy
|
||||||
@./xy
|
@./xy
|
||||||
|
|
|
@ -41,6 +41,13 @@ like `./chsrc get -no-color 2>&1`, $get_null, 'chsrc get -no-color';
|
||||||
my $fake_target_name = qr/暂不支持的换源目标/;
|
my $fake_target_name = qr/暂不支持的换源目标/;
|
||||||
like `./chsrc get fake_target_name 2>&1`, $fake_target_name, 'chsrc get fake_target_name';
|
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';
|
my $has_ruby = system 'ruby1 -v';
|
||||||
if ($has_ruby == 0) {
|
if ($has_ruby == 0) {
|
||||||
say "Ruby exists. Go on testing.";
|
say "Ruby exists. Go on testing.";
|
||||||
|
|
Loading…
Reference in New Issue
Block a user