Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CertiCompil
CompCert-KVX
Commits
d407e23f
Commit
d407e23f
authored
Apr 11, 2018
by
Cyril SIX
Browse files
MPPA - Automatic generation of expected value for tests
parent
1ecd47e8
Changes
18
Hide whitespace changes
Inline
Side-by-side
test/mppa/Makefile
View file @
d407e23f
...
...
@@ -23,10 +23,13 @@ $(DIR)/$(ASMDIR)/%.s: $(DIR)/%.c $(CCOMP)
@
mkdir
-p
$
(
@D
)
ccomp
$(DEBUG)
-O0
-v
-S
$<
-o
$@
$(DIR)/$(BINDIR)/%.tok
:
$(DIR)/$(BINDIR)/%.bin
$(DIR)/$(BINDIR)/%.tok
:
$(DIR)/$(BINDIR)/%.bin
$(DIR)/output/%.bin.exp
@
mkdir
-p
$
(
@D
)
@
bash check.sh
$<
$@
$(DIR)/output/%.bin.exp
:
$(DIR)/%.c
@
bash generate.sh
$<
$@
.PHONY
:
FORCE
FORCE
:
...
...
@@ -45,7 +48,9 @@ clean:
rm
-f
$(DIR)
/
*
.parsed.c
rm
-f
$(DIR)
/
*
.rtl.?
rm
-f
$(DIR)
/
$(ASMDIR)
/
*
.s
rm
-f
$(DIR)
/
$(BINDIR)
/
*
.[bin,tok]
rm
-f
$(DIR)
/
$(BINDIR)
/
*
.bin
rm
-f
$(DIR)
/
$(BINDIR)
/
*
.tok
rm
-f
$(DIR)
/output/
*
.out
rm
-f
$(DIR)
/output/
*
.exp
rm
-rf
$(DIR)
/profile/
rm
-f
$(ELF)
test/mppa/general/branch.c
View file @
d407e23f
...
...
@@ -10,3 +10,4 @@ int main(void){
return
b
;
}
/* RETURN VALUE: 5 */
test/mppa/general/branchz.c
View file @
d407e23f
...
...
@@ -10,3 +10,4 @@ int main(void){
return
b
;
}
/* RETURN VALUE: 3 */
test/mppa/general/branchzu.c
View file @
d407e23f
...
...
@@ -10,3 +10,4 @@ int main(void){
return
b
;
}
/* RETURN VALUE: 3 */
test/mppa/general/call.c
View file @
d407e23f
...
...
@@ -14,3 +14,5 @@ int main(void){
return
sum
(
make_42
(),
make_18
());
//return make_42() + make_18();
}
/* RETURN VALUE: 60 */
test/mppa/general/for.c
View file @
d407e23f
...
...
@@ -7,3 +7,5 @@ int main(void){
return
a
;
}
/* RETURN VALUE: 16 */
test/mppa/general/forvar.c
View file @
d407e23f
...
...
@@ -8,3 +8,5 @@ int main(void){
return
a
;
}
/* RETURN VALUE: 16 */
test/mppa/general/forvarl.c
View file @
d407e23f
...
...
@@ -9,3 +9,5 @@ int main(void)
return
0
;
}
/* RETURN VALUE: 0 */
test/mppa/general/output/branch.bin.exp
deleted
100644 → 0
View file @
1ecd47e8
5
test/mppa/general/output/branchz.bin.exp
deleted
100644 → 0
View file @
1ecd47e8
3
test/mppa/general/output/branchzu.bin.exp
deleted
100644 → 0
View file @
1ecd47e8
3
test/mppa/general/output/call.bin.exp
deleted
100644 → 0
View file @
1ecd47e8
60
test/mppa/general/output/for.bin.exp
deleted
100644 → 0
View file @
1ecd47e8
16
test/mppa/general/output/forvar.bin.exp
deleted
100644 → 0
View file @
1ecd47e8
16
test/mppa/general/output/forvarl.bin.exp
deleted
100644 → 0
View file @
1ecd47e8
0
test/mppa/general/output/simple.bin.exp
deleted
100644 → 0
View file @
1ecd47e8
7
test/mppa/general/simple.c
View file @
d407e23f
...
...
@@ -4,3 +4,5 @@ int main(void){
return
(
a
+
b
);
}
/* RETURN VALUE: 7 */
test/mppa/generate.sh
0 → 100644
View file @
d407e23f
# $1: c file to examine
# $2: write file
cfile
=
"
$1
"
writefile
=
"
$2
"
if
[
!
-f
$cfile
]
;
then
>
&2
echo
"ERROR:
$cfile
not found"
shift
;
continue
fi
sed
-n
"s/^.*
\/\*\s
*RETURN VALUE:
\s
*
\(
[0-9]*
\)\s
*
\*\/
/
\1
/p"
$1
>
$2
Write
Preview
Supports
Markdown
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