Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mongoose
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
esp
mongoose
Commits
d29f8496
Commit
d29f8496
authored
Jan 11, 2014
by
Sergey Lyubka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed optional build test
parent
848c5d75
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
20 deletions
+31
-20
Makefile
build/Makefile
+2
-2
all_build_flags.pl
build/test/all_build_flags.pl
+28
-17
Makefile
examples/Makefile
+1
-1
No files found.
build/Makefile
View file @
d29f8496
...
@@ -159,7 +159,7 @@ release: tarball macos
...
@@ -159,7 +159,7 @@ release: tarball macos
zip
-r
mongoose-php-
$(VERSION)
.zip mongoose_php_bundle/
zip
-r
mongoose-php-
$(VERSION)
.zip mongoose_php_bundle/
clean
:
clean
:
cd
../examples
&&
$(MAKE)
clean
@
cd
../examples
&&
$(MAKE)
clean
rm
-rf
*
.o
*
.core
$(PROG)
*
.obj
*
.so
$(PROG)
.txt
*
.dSYM
*
.tgz
\
@
rm
-rf
*
.o
*
.core
$(PROG)
*
.obj
*
.so
$(PROG)
.txt
*
.dSYM
*
.tgz
\
$(PROG)
.exe
*
.dll
*
.lib res.o res.RES
*
.dSYM
*
.zip
*
.pdb
\
$(PROG)
.exe
*
.dll
*
.lib res.o res.RES
*
.dSYM
*
.zip
*
.pdb
\
*
.exe
*
dmg
*
$(PROG)
-
*
unix_unit_test
*
.exe
*
dmg
*
$(PROG)
-
*
unix_unit_test
build/test/all_build_flags.pl
View file @
d29f8496
#!/usr/bin/env perl
#!/usr/bin/env perl
use
Data::
Dumper
;
@flags
=
(
"NO_POPEN"
,
"NO_SSL"
,
"NDEBUG"
,
"DEBUG"
,
"NO_CGI"
);
@flags
=
split
/\s+/
,
`egrep -o 'NO_[A-Z0-9_]*|USE_[A-Z0-9_]*' ../mongoose.c | sort | uniq`
;
#@flags = ("NO_POPEN", "NO_SSL", "NDEBUG", "DEBUG", "NO_CGI");
my
$num_flags
=
@flags
;
my
$num_flags
=
@flags
;
sub
fail
{
sub
fail
{
print
"FAILED: @_\n"
;
print
"FAILED: @_\n"
;
exit
1
;
exit
1
;
}
}
my
$platform
=
$ARGV
[
0
]
||
"linux"
;
my
$extra
=
{
'USE_SSL'
=>
'-lssl'
,
'USE_LUA'
=>
'lua_5.2.1.c'
,
};
#my $platform = $ARGV[0] || "linux";
for
(
my
$i
=
0
;
$i
<
2
**
$num_flags
;
$i
++
)
{
for
(
my
$i
=
0
;
$i
<
2
**
$num_flags
;
$i
++
)
{
my
$bitmask
=
sprintf
(
"%*.*b"
,
$num_flags
,
$num_flags
,
$i
);
my
$bitmask
=
sprintf
(
"%*.*b"
,
$num_flags
,
$num_flags
,
$i
);
my
@combination
=
();
my
@combination
=
();
for
(
my
$j
=
0
;
$j
<
$num_flags
;
$j
++
)
{
for
(
my
$j
=
0
;
$j
<
$num_flags
;
$j
++
)
{
push
@combination
,
$flags
[
$j
]
if
substr
(
$bitmask
,
$j
,
1
);
next
unless
substr
(
$bitmask
,
$j
,
1
);
}
my
$def
=
$flags
[
$j
];
my
$defines
=
join
(
" "
,
map { "-D$_" } @combina
tion
);
next
if
$def
eq
'USE_LUA_SQLITE3'
;
my
$cmd
=
"CFLAGS=\"$defines\" make clean $platform >/dev/null"
;
push
@combination
,
"-D$def"
;
system
(
$cmd
)
==
0
or
fail
"build failed: $_"
;
push
@combination
,
$extra
->
{
$def
}
if
$extra
->
{
$def
};
print
"Build succeeded, flags: [$defines]\n"
;
}
system
(
"perl test/test.pl basic_tests >/dev/null"
)
==
0
my
$defines
=
join
(
" "
,
@combination
);
or
fail
"basic tests"
;
my
$cmd
=
"make clean all CFLAGS_EXTRA=\"-O0 $defines\""
;
print
"Basic tests: OK\n"
;
#print "Testing [$defines]\n";
system
(
$cmd
)
==
0
or
fail
"build failed: $_"
;
#system("perl test/test.pl basic_tests >/dev/null") == 0
# or fail "basic tests";
#print "Basic tests: OK\n";
}
}
print
"PASS: All builds passed!\n"
;
print
"PASS: All builds passed!\n"
;
examples/Makefile
View file @
d29f8496
...
@@ -43,4 +43,4 @@ windows:
...
@@ -43,4 +43,4 @@ windows:
#$(CL) lua_dll.c $(CLFLAGS) $(DLL_FLAGS) /DLL $(LFLAGS) /SUBSYSTEM:WINDOWS /ENTRY:luaopen_lua_dll /EXPORT:luaopen_lua_dll /out:lua_dll.dll
#$(CL) lua_dll.c $(CLFLAGS) $(DLL_FLAGS) /DLL $(LFLAGS) /SUBSYSTEM:WINDOWS /ENTRY:luaopen_lua_dll /EXPORT:luaopen_lua_dll /out:lua_dll.dll
clean
:
clean
:
rm
-rf
hello upload post websocket chat
*
.exe
*
.dSYM
*
.obj .
*
o
@
rm
-rf
hello upload post websocket chat
*
.exe
*
.dSYM
*
.obj .
*
o
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment