Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
ccan
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mirror
ccan
Commits
f3948bf8
Commit
f3948bf8
authored
Sep 28, 2009
by
Rusty Russell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix "make check": this is temporary until we use ccanlint for it.
parent
0c532d80
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
6 deletions
+12
-6
ccan/grab_file/test/run-grab.c
ccan/grab_file/test/run-grab.c
+6
-1
tools/run_tests.c
tools/run_tests.c
+5
-4
tools/tools.h
tools/tools.h
+1
-1
No files found.
ccan/grab_file/test/run-grab.c
View file @
f3948bf8
...
@@ -19,6 +19,9 @@ main(int argc, char *argv[])
...
@@ -19,6 +19,9 @@ main(int argc, char *argv[])
struct
stat
st
;
struct
stat
st
;
str
=
grab_file
(
NULL
,
"test/run-grab.c"
,
NULL
);
str
=
grab_file
(
NULL
,
"test/run-grab.c"
,
NULL
);
/* FIXME: run_tests runs us from top level dir. Kill this */
if
(
!
str
)
str
=
grab_file
(
NULL
,
"ccan/grab_file/test/run-grab.c"
,
NULL
);
split
=
strsplit
(
NULL
,
str
,
"
\n
"
,
NULL
);
split
=
strsplit
(
NULL
,
str
,
"
\n
"
,
NULL
);
length
=
strlen
(
split
[
0
]);
length
=
strlen
(
split
[
0
]);
ok1
(
streq
(
split
[
0
],
"/* This is test for grab_file() function"
));
ok1
(
streq
(
split
[
0
],
"/* This is test for grab_file() function"
));
...
@@ -26,7 +29,9 @@ main(int argc, char *argv[])
...
@@ -26,7 +29,9 @@ main(int argc, char *argv[])
length
+=
strlen
(
split
[
i
]);
length
+=
strlen
(
split
[
i
]);
ok1
(
streq
(
split
[
i
-
1
],
"/* End of grab_file() test */"
));
ok1
(
streq
(
split
[
i
-
1
],
"/* End of grab_file() test */"
));
if
(
stat
(
"test/run-grab.c"
,
&
st
)
!=
0
)
if
(
stat
(
"test/run-grab.c"
,
&
st
)
!=
0
)
err
(
1
,
"Could not stat self"
);
/* FIXME: ditto */
if
(
stat
(
"ccan/grab_file/test/run-grab.c"
,
&
st
)
!=
0
)
err
(
1
,
"Could not stat self"
);
ok1
(
st
.
st_size
==
length
+
i
);
ok1
(
st
.
st_size
==
length
+
i
);
return
0
;
return
0
;
...
...
tools/run_tests.c
View file @
f3948bf8
...
@@ -46,7 +46,7 @@ static char *output_name(const char *name)
...
@@ -46,7 +46,7 @@ static char *output_name(const char *name)
return
ret
;
return
ret
;
}
}
static
char
*
obj_list
(
void
)
static
char
*
obj_list
(
const
char
*
dir
)
{
{
char
*
list
=
talloc_strdup
(
objs
,
""
);
char
*
list
=
talloc_strdup
(
objs
,
""
);
struct
obj
*
i
;
struct
obj
*
i
;
...
@@ -55,7 +55,8 @@ static char *obj_list(void)
...
@@ -55,7 +55,8 @@ static char *obj_list(void)
list
=
talloc_asprintf_append
(
list
,
"%s "
,
i
->
name
);
list
=
talloc_asprintf_append
(
list
,
"%s "
,
i
->
name
);
/* FIXME */
/* FIXME */
list
=
talloc_asprintf_append
(
list
,
"ccan/tap/tap.o"
);
if
(
!
streq
(
dir
,
"tap"
)
&&
!
strends
(
dir
,
"/tap"
))
list
=
talloc_asprintf_append
(
list
,
"ccan/tap/tap.o"
);
return
list
;
return
list
;
}
}
...
@@ -110,8 +111,8 @@ static int build(const char *dir, const char *name, const char *apiobj,
...
@@ -110,8 +111,8 @@ static int build(const char *dir, const char *name, const char *apiobj,
cmd
=
talloc_asprintf
(
name
,
"gcc "
CFLAGS
" %s -o %s %s %s %s%s %s"
,
cmd
=
talloc_asprintf
(
name
,
"gcc "
CFLAGS
" %s -o %s %s %s %s%s %s"
,
fail
?
"-DFAIL"
:
""
,
fail
?
"-DFAIL"
:
""
,
output_name
(
name
),
name
,
apiobj
,
obj_list
(
),
libs
,
output_name
(
name
),
name
,
apiobj
,
obj_list
(
dir
)
,
verbose
?
""
:
"> /dev/null 2>&1"
);
libs
,
verbose
?
""
:
"> /dev/null 2>&1"
);
if
(
verbose
)
if
(
verbose
)
fprintf
(
stderr
,
"Running %s
\n
"
,
cmd
);
fprintf
(
stderr
,
"Running %s
\n
"
,
cmd
);
...
...
tools/tools.h
View file @
f3948bf8
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
#define SPACE_CHARS " \f\n\r\t\v"
#define SPACE_CHARS " \f\n\r\t\v"
/* FIXME: Remove some -I */
/* FIXME: Remove some -I */
#define CFLAGS "-O -Wall -Wundef -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Werror -Iccan/ -I.. -I../.."
#define CFLAGS "-O -Wall -Wundef -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Werror -Iccan/ -I.
-I.
. -I../.."
/* This actually compiles and runs the info file to get dependencies. */
/* This actually compiles and runs the info file to get dependencies. */
char
**
get_deps
(
const
void
*
ctx
,
const
char
*
dir
,
const
char
*
name
,
char
**
get_deps
(
const
void
*
ctx
,
const
char
*
dir
,
const
char
*
name
,
...
...
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