Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
86d013a7
Commit
86d013a7
authored
Jan 12, 2011
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make using DejaGNU work for libgo testing on a native system.
From-SVN: r168729
parent
a49b692a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
42 additions
and
22 deletions
+42
-22
libgo/Makefile.am
+9
-5
libgo/Makefile.in
+9
-5
libgo/testsuite/gotest
+16
-6
libgo/testsuite/lib/libgo.exp
+1
-1
libgo/testsuite/libgo.testmain/testmain.exp
+7
-5
No files found.
libgo/Makefile.am
View file @
86d013a7
...
...
@@ -1237,12 +1237,16 @@ CHECK = \
rm
-f
$@
-log
;
\
prefix
=
`
if
test
"
$
(@D)"
=
"regexp"
;
then
echo
regexp-test
;
else
dirname
$
(
@D
)
;
fi
`
;
\
test
"
$$
{prefix}"
!=
"."
||
prefix
=
"
$
(@D)"
;
\
if
$(srcdir)
/testsuite/gotest
--dejagnu
=
$(use_dejagnu)
--basedir
=
$(srcdir)
--srcdir
=
$(srcdir)
/go/
$
(
@D
)
--prefix
=
"libgo_
$$
{prefix}"
--pkgfiles
=
"
$
(go_
$
(subst /,_,
$
(@D))_files)"
>>
$@
-log
2>&1
;
then
\
echo
"PASS:
$
(@D
)"
;
\
if
test
"
$(use_dejagnu)
"
=
"yes"
;
then
\
$(srcdir)
/testsuite/gotest
--dejagnu
=
yes
--basedir
=
$(srcdir)
--srcdir
=
$(srcdir)
/go/
$
(
@D
)
--prefix
=
"libgo_
$$
{prefix}"
--pkgfiles
=
"
$
(go_
$
(subst /,_,
$
(@D))_files
)"
;
\
else
\
echo
"FAIL:
$
(@D)"
;
\
cat
$@
-log
;
\
exit
1
;
\
if
$(srcdir)
/testsuite/gotest
--basedir
=
$(srcdir)
--srcdir
=
$(srcdir)
/go/
$
(
@D
)
--prefix
=
"libgo_
$$
{prefix}"
--pkgfiles
=
"
$
(go_
$
(subst /,_,
$
(@D))_files)"
>>
$@
-log
2>&1
;
then
\
echo
"PASS:
$
(@D)"
;
\
else
\
echo
"FAIL:
$
(@D)"
;
\
cat
$@
-log
;
\
exit
1
;
\
fi
;
\
fi
# Build all packages before checking any.
...
...
libgo/Makefile.in
View file @
86d013a7
...
...
@@ -1583,12 +1583,16 @@ CHECK = \
rm
-f
$@
-log
;
\
prefix
=
`
if
test
"
$
(@D)"
=
"regexp"
;
then
echo
regexp-test
;
else
dirname
$
(
@D
)
;
fi
`
;
\
test
"
$$
{prefix}"
!=
"."
||
prefix
=
"
$
(@D)"
;
\
if
$(srcdir)
/testsuite/gotest
--dejagnu
=
$(use_dejagnu)
--basedir
=
$(srcdir)
--srcdir
=
$(srcdir)
/go/
$
(
@D
)
--prefix
=
"libgo_
$$
{prefix}"
--pkgfiles
=
"
$
(go_
$
(subst /,_,
$
(@D))_files)"
>>
$@
-log
2>&1
;
then
\
echo
"PASS:
$
(@D
)"
;
\
if
test
"
$(use_dejagnu)
"
=
"yes"
;
then
\
$(srcdir)
/testsuite/gotest
--dejagnu
=
yes
--basedir
=
$(srcdir)
--srcdir
=
$(srcdir)
/go/
$
(
@D
)
--prefix
=
"libgo_
$$
{prefix}"
--pkgfiles
=
"
$
(go_
$
(subst /,_,
$
(@D))_files
)"
;
\
else
\
echo
"FAIL:
$
(@D)"
;
\
cat
$@
-log
;
\
exit
1
;
\
if
$(srcdir)
/testsuite/gotest
--basedir
=
$(srcdir)
--srcdir
=
$(srcdir)
/go/
$
(
@D
)
--prefix
=
"libgo_
$$
{prefix}"
--pkgfiles
=
"
$
(go_
$
(subst /,_,
$
(@D))_files)"
>>
$@
-log
2>&1
;
then
\
echo
"PASS:
$
(@D)"
;
\
else
\
echo
"FAIL:
$
(@D)"
;
\
cat
$@
-log
;
\
exit
1
;
\
fi
;
\
fi
...
...
libgo/testsuite/gotest
View file @
86d013a7
...
...
@@ -314,16 +314,26 @@ xno)
./a.out
"
$@
"
;;
xyes
)
# This is the only file which is optionally made.
# All others are overwritten on copying/building,
# but this may remain and cause conflicts if not
# deleted.
rm
-rf
../testsuite/_xtest_.o
cp
*
.o _testmain.go ../testsuite
rm
-rf
../testsuite/
*
.o
files
=
`
echo
*
`
for
f
in
$files
;
do
if
test
"
$f
"
=
"_obj"
||
test
"
$f
"
=
"_test"
;
then
continue
fi
rm
-rf
../testsuite/
$f
if
test
-f
$f
;
then
cp
$f
../testsuite/
else
ln
-s
../
$DIR
/
$f
../testsuite/
fi
done
cd
../testsuite
rm
-rf
_obj _test
mkdir _obj _test
$MAKE
check
RUNTESTFLAGS
=
"
$RUNTESTFLAGS
GOTEST_TMPDIR=
$DIR
"
# Useful when using make check-target-libgo
cat
libgo.log
>>
libgo-all.log
cat
libgo.sum
>>
libgo-all.sum
rm
-rf
$files
;;
esac
libgo/testsuite/lib/libgo.exp
View file @
86d013a7
...
...
@@ -18,7 +18,7 @@ set gccdir [lookfor_file $tool_root_dir gcc/libgcc.a]
if {$gccdir != ""} {
set gccdir [file dirname $gccdir]
}
set GO_UNDER_TEST "$gccdir/gccgo -B$gccdir/"
set GO
C
_UNDER_TEST "$gccdir/gccgo -B$gccdir/"
set TESTING_IN_BUILD_TREE 1
proc go_maybe_build_wrapper { args } {
...
...
libgo/testsuite/libgo.testmain/testmain.exp
View file @
86d013a7
...
...
@@ -17,7 +17,6 @@
load_lib libgo.exp
lappend options "additional_flags=-I. -w -g"
lappend ld_options "ldflags=-lgotesting"
if [istarget "*-*-rtems*"] {
global options
...
...
@@ -44,9 +43,9 @@ if [istarget "*-*-rtems*"] {
}
set object_files [glob -nocomplain "*.o"]
regsub $gluefile $object_files "" object_files
lappend options $ld_options
if [info exists gluefile] {
regsub $gluefile $object_files "" object_files
}
set comp_output [go_target_compile "$object_files _testmain.go" \
"./a.exe" "executable" $options]
...
...
@@ -55,4 +54,7 @@ if ![ string match "" $comp_output ] {
exit 1
}
libgo_load "./a.exe" "" ""
set result [libgo_load "./a.exe" "" ""]
set status [lindex $result 0]
$status go
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