Fix the build of test_app_server on 64bit

So many Jamfiles to search through...runs also, but there
are lots of graphical glitches

Change-Id: Ibf9e64566a5b8c5742792ac9b1b0f9ccc6693c8d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1753
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
CodeforEvolution 2019-08-27 22:56:47 -05:00 committed by waddlesplash
parent 1761cb8e6f
commit 9e54316c52
63 changed files with 193 additions and 151 deletions

View File

@ -22,7 +22,7 @@ rule TargetLibstdc++ asPath
# Returns the c++-standard-library for the target. # Returns the c++-standard-library for the target.
# Invoking with <asPath> = true will return the full library path. # Invoking with <asPath> = true will return the full library path.
if $(TARGET_PLATFORM) = haiku { if $(TARGET_PLATFORM) = haiku || $(TARGET_PLATFORM) = libbe_test {
if $(TARGET_PACKAGING_ARCH) = x86_gcc2 { if $(TARGET_PACKAGING_ARCH) = x86_gcc2 {
# the libstdc++.so for our legacy compiler (needs to be built) # the libstdc++.so for our legacy compiler (needs to be built)
return libstdc++.r4.so ; return libstdc++.r4.so ;
@ -35,13 +35,8 @@ rule TargetLibstdc++ asPath
return [ return [
BuildFeatureAttribute gcc_syslibs : libstdc++.so : $(flags) BuildFeatureAttribute gcc_syslibs : libstdc++.so : $(flags)
] ; ] ;
} else {
if $(TARGET_PLATFORM) = libbe_test {
# Use the existing host library
return stdc++.r4 ;
}
# TODO: return libstdc++.so for non-Haiku target platform if needed
} }
# TODO: return libstdc++.so for non-Haiku target platform if needed
} }

View File

@ -11,7 +11,7 @@ Application CharacterMap :
UnicodeBlocks.cpp UnicodeBlocks.cpp
UnicodeBlockView.cpp UnicodeBlockView.cpp
: be [ TargetLibsupc++ ] localestub : be [ TargetLibstdc++ ] [ TargetLibsupc++ ] localestub
: CharacterMap.rdef : CharacterMap.rdef
; ;

View File

@ -6,7 +6,7 @@ UsePrivateHeaders shared ;
Application Magnify : Application Magnify :
Magnify.cpp Magnify.cpp
: be game localestub [ TargetLibsupc++ ] tracker translation : be game localestub [ TargetLibstdc++ ] [ TargetLibsupc++ ] tracker translation
: Magnify.rdef : Magnify.rdef
; ;

View File

@ -5,9 +5,9 @@ AddSubDirSupportedPlatforms libbe_test ;
UsePrivateHeaders app interface shared ; UsePrivateHeaders app interface shared ;
Application Workspaces : Application Workspaces :
Workspaces.cpp Workspaces.cpp
: be shared localestub [ TargetLibsupc++ ] : be shared localestub [ TargetLibstdc++ ] [ TargetLibsupc++ ]
: Workspaces.rdef : Workspaces.rdef
; ;
if $(TARGET_PLATFORM) = libbe_test { if $(TARGET_PLATFORM) = libbe_test {

View File

@ -123,7 +123,7 @@ StdBinCommands
settype.cpp settype.cpp
spybmessage.cpp spybmessage.cpp
urlwrapper.cpp urlwrapper.cpp
: be [ TargetLibsupc++ ] : $(haiku-utils_rsrc) ; : be [ TargetLibstdc++ ] [ TargetLibsupc++ ] : $(haiku-utils_rsrc) ;
# standard commands that need libbe.so, libsupc++.so, and libshared.a # standard commands that need libbe.so, libsupc++.so, and libshared.a
StdBinCommands StdBinCommands

View File

@ -63,11 +63,11 @@ UsePrivateHeaders storage mime ;
SharedLibrary libbe_test.so : SharedLibrary libbe_test.so :
: :
<libbe!$(HAIKU_PACKAGING_ARCH)>app_kit.o <libbe!$(TARGET_PACKAGING_ARCH)>app_kit.o
<libbe!$(HAIKU_PACKAGING_ARCH)>interface_kit.o <libbe!$(TARGET_PACKAGING_ARCH)>interface_kit.o
<libbe!$(HAIKU_PACKAGING_ARCH)>locale_kit.o <libbe!$(TARGET_PACKAGING_ARCH)>locale_kit.o
<libbe!$(HAIKU_PACKAGING_ARCH)>storage_kit.o <libbe!$(TARGET_PACKAGING_ARCH)>storage_kit.o
<libbe!$(HAIKU_PACKAGING_ARCH)>support_kit.o <libbe!$(TARGET_PACKAGING_ARCH)>support_kit.o
[ MultiArchDefaultGristFiles libstorage_kit_mime.a ] [ MultiArchDefaultGristFiles libstorage_kit_mime.a ]
@ -77,7 +77,8 @@ SharedLibrary libbe_test.so :
[ TargetLibstdc++ ] [ TargetLibstdc++ ]
[ BuildFeatureAttribute icu : libraries ] [ BuildFeatureAttribute icu : libraries ]
[ BuildFeatureAttribute zlib : library ] [ BuildFeatureAttribute zlib : library ]
; [ BuildFeatureAttribute zstd : library ]
;
SEARCH_SOURCE += [ FDirName $(SUBDIR) interface ] ; SEARCH_SOURCE += [ FDirName $(SUBDIR) interface ] ;
SEARCH_SOURCE += [ FDirName $(SUBDIR) interface textview_support ] ; SEARCH_SOURCE += [ FDirName $(SUBDIR) interface textview_support ] ;

View File

@ -37,7 +37,7 @@ if $(TARGET_PLATFORM) = haiku {
SharedLibrary libgame.so : SharedLibrary libgame.so :
DirectWindow.cpp DirectWindow.cpp
WindowScreen.cpp WindowScreen.cpp
: be : be [ TargetLibstdc++ ]
; ;
HaikuInstall install-test-apps : $(HAIKU_APP_TEST_LIB_DIR) : libgame.so HaikuInstall install-test-apps : $(HAIKU_APP_TEST_LIB_DIR) : libgame.so

View File

@ -18,7 +18,7 @@ for architectureObject in [ MultiArchSubDirSetup ] {
: :
be be
[ MultiArchDefaultGristFiles libiconv.a ] [ MultiArchDefaultGristFiles libiconv.a ]
[ TargetLibsupc++ ] localestub ; [ TargetLibstdc++ ] [ TargetLibsupc++ ] localestub ;
} }
} }

View File

@ -24,7 +24,7 @@ Preference FileTypes :
PreferredAppMenu.cpp PreferredAppMenu.cpp
StringView.cpp StringView.cpp
: be tracker [ TargetLibsupc++ ] localestub : be tracker [ TargetLibstdc++ ] [ TargetLibsupc++ ] localestub
: FileTypes.rdef FileTypes.icons.rdef : FileTypes.rdef FileTypes.icons.rdef
; ;

View File

@ -17,7 +17,7 @@ Preference Screen :
ScreenSettings.cpp ScreenSettings.cpp
ScreenWindow.cpp ScreenWindow.cpp
Utility.cpp Utility.cpp
: be [ TargetLibsupc++ ] localestub libaccelerantscommon.a : be [ TargetLibstdc++ ] [ TargetLibsupc++ ] localestub libaccelerantscommon.a
: Screen.rdef : Screen.rdef
; ;

View File

@ -7,7 +7,7 @@ Application Chart :
ChartRender.cpp ChartRender.cpp
ChartView.cpp ChartView.cpp
ChartWindow.cpp ChartWindow.cpp
: be game localestub [ TargetLibsupc++ ] : be game localestub [ TargetLibstdc++ ] [ TargetLibsupc++ ]
: Chart.rdef : Chart.rdef
; ;

View File

@ -4,7 +4,7 @@ AddSubDirSupportedPlatforms libbe_test ;
SimpleTest DirectWindowStars SimpleTest DirectWindowStars
: Stars.cpp StarWindow.cpp : Stars.cpp StarWindow.cpp
: game be [ TargetLibsupc++ ] : game be [ TargetLibstdc++ ] [ TargetLibsupc++ ]
; ;
if ( $(TARGET_PLATFORM) = libbe_test ) { if ( $(TARGET_PLATFORM) = libbe_test ) {

View File

@ -5,7 +5,7 @@ SetSubDirSupportedPlatforms haiku libbe_test ;
SimpleTest LayoutTest1 : SimpleTest LayoutTest1 :
LayoutTest1.cpp LayoutTest1.cpp
: :
be [ TargetLibsupc++ ] be [ TargetLibstdc++ ] [ TargetLibsupc++ ]
; ;
if $(TARGET_PLATFORM) = libbe_test { if $(TARGET_PLATFORM) = libbe_test {

View File

@ -33,7 +33,7 @@ SimpleTest WidgetLayoutTest :
TextControlTest.cpp TextControlTest.cpp
TextViewTest.cpp TextViewTest.cpp
: :
be [ TargetLibsupc++ ] be [ TargetLibsupc++ ] [ TargetLibstdc++ ]
; ;
if $(TARGET_PLATFORM) = libbe_test { if $(TARGET_PLATFORM) = libbe_test {

View File

@ -122,7 +122,7 @@ BoxTest::ActivateTest(View* controls)
fBorderStyleRadioGroup->AddButton(button->GetRadioButton()); fBorderStyleRadioGroup->AddButton(button->GetRadioButton());
// default to no border // default to no border
fBorderStyleRadioGroup->SelectButton(0L); fBorderStyleRadioGroup->SelectButton((int32)0);
// spacing // spacing
group->AddChild(new VStrut(10)); group->AddChild(new VStrut(10));
@ -148,7 +148,7 @@ BoxTest::ActivateTest(View* controls)
fLabelRadioGroup->AddButton(button->GetRadioButton()); fLabelRadioGroup->AddButton(button->GetRadioButton());
// default to no border // default to no border
fLabelRadioGroup->SelectButton(0L); fLabelRadioGroup->SelectButton((int32)0);
// spacing // spacing
group->AddChild(new VStrut(10)); group->AddChild(new VStrut(10));

View File

@ -78,7 +78,7 @@ ScrollBarTest::ActivateTest(View* controls)
fOrientationRadioGroup->AddButton(button->GetRadioButton()); fOrientationRadioGroup->AddButton(button->GetRadioButton());
// default to horizontal // default to horizontal
fOrientationRadioGroup->SelectButton(0L); fOrientationRadioGroup->SelectButton((int32)0);
// glue // glue
vGroup->AddChild(new Glue()); vGroup->AddChild(new Glue());

View File

@ -206,7 +206,7 @@ SliderTest::ActivateTest(View* controls)
fOrientationRadioGroup->AddButton(button->GetRadioButton()); fOrientationRadioGroup->AddButton(button->GetRadioButton());
// default to horizontal // default to horizontal
fOrientationRadioGroup->SelectButton(0L); fOrientationRadioGroup->SelectButton((int32)0);
// the radio button group for selecting the thumb style // the radio button group for selecting the thumb style
@ -228,7 +228,7 @@ SliderTest::ActivateTest(View* controls)
fThumbStyleRadioGroup->AddButton(button->GetRadioButton()); fThumbStyleRadioGroup->AddButton(button->GetRadioButton());
// default to block thumb // default to block thumb
fThumbStyleRadioGroup->SelectButton(0L); fThumbStyleRadioGroup->SelectButton((int32)0);
// spacing // spacing
group->AddChild(new VStrut(10)); group->AddChild(new VStrut(10));
@ -263,7 +263,7 @@ SliderTest::ActivateTest(View* controls)
fHashMarkLocationRadioGroup->AddButton(button->GetRadioButton()); fHashMarkLocationRadioGroup->AddButton(button->GetRadioButton());
// default to no hash marks // default to no hash marks
fHashMarkLocationRadioGroup->SelectButton(0L); fHashMarkLocationRadioGroup->SelectButton((int32)0);
// spacing // spacing
group->AddChild(new VStrut(10)); group->AddChild(new VStrut(10));
@ -289,7 +289,7 @@ SliderTest::ActivateTest(View* controls)
fBarThicknessRadioGroup->AddButton(button->GetRadioButton()); fBarThicknessRadioGroup->AddButton(button->GetRadioButton());
// default to default thickness // default to default thickness
fBarThicknessRadioGroup->SelectButton(1L); fBarThicknessRadioGroup->SelectButton((int32)1);
// spacing // spacing
group->AddChild(new VStrut(10)); group->AddChild(new VStrut(10));
@ -316,7 +316,7 @@ SliderTest::ActivateTest(View* controls)
fLabelRadioGroup->AddButton(button->GetRadioButton()); fLabelRadioGroup->AddButton(button->GetRadioButton());
// default to normal label // default to normal label
fLabelRadioGroup->SelectButton(1L); fLabelRadioGroup->SelectButton((int32)1);
// spacing // spacing
group->AddChild(new VStrut(10)); group->AddChild(new VStrut(10));
@ -343,7 +343,7 @@ SliderTest::ActivateTest(View* controls)
fLimitLabelsRadioGroup->AddButton(button->GetRadioButton()); fLimitLabelsRadioGroup->AddButton(button->GetRadioButton());
// default to no limit labels // default to no limit labels
fLimitLabelsRadioGroup->SelectButton(0L); fLimitLabelsRadioGroup->SelectButton((int32)0);
// spacing // spacing
group->AddChild(new VStrut(10)); group->AddChild(new VStrut(10));

View File

@ -23,9 +23,9 @@ UseLibraryHeaders agg expat ;
SimpleTest PictureTest : SimpleTest PictureTest :
PictureTest.cpp PictureTest.cpp
SVGViewView.cpp SVGViewView.cpp
: be translation : be translation
[ BuildFeatureAttribute expat : library ] [ BuildFeatureAttribute expat : library ]
[ TargetLibsupc++ ] [ TargetLibstdc++ ] [ TargetLibsupc++ ]
; ;
if $(TARGET_PLATFORM) = libbe_test { if $(TARGET_PLATFORM) = libbe_test {

View File

@ -81,8 +81,10 @@ SharedLibrary libhwinterfaceimpl.so :
DWindowHWInterface.cpp DWindowHWInterface.cpp
MultiLocker.cpp MultiLocker.cpp
# trace.c # libraries
: libhwinterface.so :
libhwinterface.so
[ TargetLibstdc++ ]
; ;
local decorator_src = local decorator_src =
@ -187,6 +189,7 @@ SharedLibrary libtestappserver.so :
: be libpainter.a libagg.a libtextencoding.so shared libstackandtile.a : be libpainter.a libagg.a libtextencoding.so shared libstackandtile.a
liblinprog.a libhwinterface.so libhwinterfaceimpl.so liblinprog.a libhwinterface.so libhwinterfaceimpl.so
[ BuildFeatureAttribute freetype : library ] [ BuildFeatureAttribute freetype : library ]
[ TargetLibstdc++ ]
; ;
Includes [ FGristFiles AppServer.cpp BitmapManager.cpp Canvas.cpp Includes [ FGristFiles AppServer.cpp BitmapManager.cpp Canvas.cpp
@ -222,6 +225,9 @@ HaikuInstall install-test-apps : $(HAIKU_APP_TEST_LIB_DIR)
HaikuInstall install-test-apps : $(HAIKU_APP_TEST_DIR) : test_app_server HaikuInstall install-test-apps : $(HAIKU_APP_TEST_DIR) : test_app_server
: tests!apps ; : tests!apps ;
HaikuInstall install-test-apps : $(HAIKU_APP_TEST_DIR) : run.sh
: tests!apps ;
} # if $(TARGET_PLATFORM) = libbe_test } # if $(TARGET_PLATFORM) = libbe_test
SubInclude HAIKU_TOP src tests servers app archived_view ; SubInclude HAIKU_TOP src tests servers app archived_view ;

View File

@ -4,12 +4,17 @@ There is a pseudo target "install-test-apps" which needs to be built like this:
$ TARGET_PLATFORM=libbe_test jam install-test-apps $ TARGET_PLATFORM=libbe_test jam install-test-apps
This will build "test_registrar", "test_app_server", the needed libs and some test apps and install everything into "generated/tests/apps". This will build "test_registrar", "test_app_server",
the needed libs and some test apps and install everything into "generated/tests/libbe_test/(your architecture)/apps".
You can use the "run" script in this folder to run the servers, as well as open the test app folder in Tracker (via the -o option), or launch specific test app(s) by specifying their name in the command line, for example "run WindowInvalidation". You can use the "run.sh" script installed in the "generated/tests/libbe_test/(your architecture)/apps" folder to run the servers,
as well as open the test app folder in Tracker (via the -o option),
or launch specific test app(s) by specifying their name in the command line,
for example "run WindowInvalidation".
NOTE: it is currently necessary to prefix the starting of test_app_server with NOTE: it is currently necessary to prefix the starting of test_app_server with
LD_PRELOAD="lib/libbe_test.so" LD_PRELOAD="lib/libbe_test.so"
This is a bug that should be fixed (go for it :-), but supplying the library manually is a workaround for using test_app_server for now. This is a bug that should be fixed (go for it :-),
but supplying the library manually is a workaround for using test_app_server for now.
Have fun! Have fun!

View File

@ -7,7 +7,7 @@ UseHeaders [ FDirName os interface ] ;
SimpleTest ArchivedView : SimpleTest ArchivedView :
main.cpp main.cpp
: be [ TargetLibsupc++ ] : be [ TargetLibstdc++ ] [ TargetLibsupc++ ]
: ArchivedView.rdef : ArchivedView.rdef
; ;

View File

@ -7,7 +7,7 @@ UseHeaders [ FDirName os interface ] ;
SimpleTest AsyncDrawing : SimpleTest AsyncDrawing :
main.cpp main.cpp
: be [ TargetLibsupc++ ] ; : be [ TargetLibstdc++ ] [ TargetLibsupc++ ] ;
if ( $(TARGET_PLATFORM) = libbe_test ) { if ( $(TARGET_PLATFORM) = libbe_test ) {
HaikuInstall install-test-apps : $(HAIKU_APP_TEST_DIR) : AsyncDrawing HaikuInstall install-test-apps : $(HAIKU_APP_TEST_DIR) : AsyncDrawing

View File

@ -7,7 +7,7 @@ UseHeaders [ FDirName os interface ] ;
Application AvoidFocus : Application AvoidFocus :
AvoidFocus.cpp AvoidFocus.cpp
: be [ TargetLibsupc++ ] : be [ TargetLibstdc++ ] [ TargetLibsupc++ ]
; ;
if $(TARGET_PLATFORM) = libbe_test { if $(TARGET_PLATFORM) = libbe_test {

View File

@ -14,7 +14,7 @@ Application Benchmark :
Test.cpp Test.cpp
TestWindow.cpp TestWindow.cpp
VerticalLineTest.cpp VerticalLineTest.cpp
: be [ TargetLibsupc++ ] : be [ TargetLibstdc++ ] [ TargetLibsupc++ ]
; ;
if ( $(TARGET_PLATFORM) = libbe_test ) { if ( $(TARGET_PLATFORM) = libbe_test ) {

View File

@ -7,7 +7,7 @@ UseHeaders [ FDirName os interface ] ;
SimpleTest BitmapBounds : SimpleTest BitmapBounds :
main.cpp main.cpp
: be [ TargetLibsupc++ ] ; : be [ TargetLibstdc++ ] [ TargetLibsupc++ ] ;
if ( $(TARGET_PLATFORM) = libbe_test ) { if ( $(TARGET_PLATFORM) = libbe_test ) {
HaikuInstall install-test-apps : $(HAIKU_APP_TEST_DIR) : BitmapBounds HaikuInstall install-test-apps : $(HAIKU_APP_TEST_DIR) : BitmapBounds

View File

@ -7,7 +7,7 @@ UseHeaders [ FDirName os interface ] ;
Application BitmapDrawing : Application BitmapDrawing :
main.cpp main.cpp
: be [ TargetLibsupc++ ] : be [ TargetLibstdc++ ] [ TargetLibsupc++ ]
; ;
if ( $(TARGET_PLATFORM) = libbe_test ) { if ( $(TARGET_PLATFORM) = libbe_test ) {

View File

@ -7,7 +7,7 @@ UseHeaders [ FDirName os interface ] ;
SimpleTest ClipToPicture : SimpleTest ClipToPicture :
main.cpp main.cpp
: be [ TargetLibsupc++ ] : be [ TargetLibstdc++ ] [ TargetLibsupc++ ]
; ;
if ( $(TARGET_PLATFORM) = libbe_test ) { if ( $(TARGET_PLATFORM) = libbe_test ) {

View File

@ -2,6 +2,6 @@ SubDir HAIKU_TOP src tests servers app code_to_name ;
SimpleTest code_to_name SimpleTest code_to_name
: code_to_name.cpp : code_to_name.cpp
: be : be [ TargetLibstdc++ ]
; ;

View File

@ -7,7 +7,7 @@ UseHeaders [ FDirName os interface ] ;
SimpleTest ClippingRegion : SimpleTest ClippingRegion :
main.cpp main.cpp
: be [ TargetLibsupc++ ] ; : be [ TargetLibstdc++ ] [ TargetLibsupc++ ] ;
if ( $(TARGET_PLATFORM) = libbe_test ) { if ( $(TARGET_PLATFORM) = libbe_test ) {
HaikuInstall install-test-apps : $(HAIKU_APP_TEST_DIR) : ClippingRegion HaikuInstall install-test-apps : $(HAIKU_APP_TEST_DIR) : ClippingRegion

View File

@ -7,7 +7,7 @@ UseHeaders [ FDirName os interface ] ;
SimpleTest CopyBits : SimpleTest CopyBits :
main.cpp main.cpp
: be [ TargetLibsupc++ ] ; : be [ TargetLibstdc++ ] [ TargetLibsupc++ ] ;
#if ( $(TARGET_PLATFORM) = libbe_test ) { #if ( $(TARGET_PLATFORM) = libbe_test ) {
# HaikuInstall install-test-apps : $(HAIKU_APP_TEST_DIR) : CopyBits # HaikuInstall install-test-apps : $(HAIKU_APP_TEST_DIR) : CopyBits

View File

@ -7,7 +7,7 @@ UseHeaders [ FDirName os interface ] ;
Application CursorTest : Application CursorTest :
CursorTest.cpp CursorTest.cpp
: be [ TargetLibsupc++ ] : be [ TargetLibstdc++ ] [ TargetLibsupc++ ]
; ;
if $(TARGET_PLATFORM) = libbe_test { if $(TARGET_PLATFORM) = libbe_test {

View File

@ -8,7 +8,7 @@ UsePrivateHeaders interface ;
Application DesktopWindow : Application DesktopWindow :
DesktopWindow.cpp DesktopWindow.cpp
: be [ TargetLibsupc++ ] : be [ TargetLibstdc++ ] [ TargetLibsupc++ ]
; ;
if $(TARGET_PLATFORM) = libbe_test { if $(TARGET_PLATFORM) = libbe_test {

View File

@ -7,7 +7,7 @@ UseHeaders [ FDirName os interface ] ;
SimpleTest DrawStringOffsets : SimpleTest DrawStringOffsets :
main.cpp main.cpp
: be [ TargetLibsupc++ ] : be [ TargetLibstdc++ ] [ TargetLibsupc++ ]
; ;
if ( $(TARGET_PLATFORM) = libbe_test ) { if ( $(TARGET_PLATFORM) = libbe_test ) {

View File

@ -7,7 +7,7 @@ UseHeaders [ FDirName os interface ] ;
Application EventMask : Application EventMask :
EventMask.cpp EventMask.cpp
: be [ TargetLibsupc++ ] : be [ TargetLibstdc++ ] [ TargetLibsupc++ ]
; ;
if $(TARGET_PLATFORM) = libbe_test { if $(TARGET_PLATFORM) = libbe_test {

View File

@ -7,7 +7,7 @@ UseHeaders [ FDirName os interface ] ;
Application FindView : Application FindView :
FindView.cpp FindView.cpp
: be [ TargetLibsupc++ ] : be [ TargetLibstdc++ ] [ TargetLibsupc++ ]
; ;
if ( $(TARGET_PLATFORM) = libbe_test ) { if ( $(TARGET_PLATFORM) = libbe_test ) {

View File

@ -7,7 +7,7 @@ UseHeaders [ FDirName os interface ] ;
SimpleTest Following : SimpleTest Following :
main.cpp main.cpp
: be [ TargetLibsupc++ ] ; : be [ TargetLibstdc++ ] [ TargetLibsupc++ ] ;
if ( $(TARGET_PLATFORM) = libbe_test ) { if ( $(TARGET_PLATFORM) = libbe_test ) {
HaikuInstall install-test-apps : $(HAIKU_APP_TEST_DIR) : Following HaikuInstall install-test-apps : $(HAIKU_APP_TEST_DIR) : Following

View File

@ -7,7 +7,7 @@ UseHeaders [ FDirName os interface ] ;
SimpleTest FontSpacing : SimpleTest FontSpacing :
main.cpp main.cpp
: be [ TargetLibsupc++ ] : be [ TargetLibstdc++ ] [ TargetLibsupc++ ]
: :
; ;

View File

@ -10,7 +10,7 @@ SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src tests servers app harness ] ;
SimpleTest Gradients : SimpleTest Gradients :
harness.cpp harness.cpp
main.cpp main.cpp
: be [ TargetLibsupc++ ] : be [ TargetLibstdc++ ] [ TargetLibsupc++ ]
: Gradients.rdef : Gradients.rdef
; ;

View File

@ -7,7 +7,7 @@ UseHeaders [ FDirName os interface ] ;
Application HideAndShow : Application HideAndShow :
HideAndShow.cpp HideAndShow.cpp
: be [ TargetLibsupc++ ] : be [ TargetLibstdc++ ] [ TargetLibsupc++ ]
; ;
if $(TARGET_PLATFORM) = libbe_test { if $(TARGET_PLATFORM) = libbe_test {

View File

@ -2,5 +2,5 @@ SubDir HAIKU_TOP src tests servers app idle_test ;
SimpleTest idle_test : SimpleTest idle_test :
test.cpp test.cpp
: be ; : be [ TargetLibstdc++ ] ;

View File

@ -7,7 +7,7 @@ UseHeaders [ FDirName os interface ] ;
SimpleTest LaggingGetMouse : SimpleTest LaggingGetMouse :
main.cpp main.cpp
: be [ TargetLibsupc++ ] ; : be [ TargetLibstdc++ ] [ TargetLibsupc++ ] ;
if ( $(TARGET_PLATFORM) = libbe_test ) { if ( $(TARGET_PLATFORM) = libbe_test ) {
HaikuInstall install-test-apps : $(HAIKU_APP_TEST_DIR) : LaggingGetMouse HaikuInstall install-test-apps : $(HAIKU_APP_TEST_DIR) : LaggingGetMouse

View File

@ -7,7 +7,7 @@ UseHeaders [ FDirName os interface ] ;
Application LockFocusTest : Application LockFocusTest :
LockFocusTest.cpp LockFocusTest.cpp
: be [ TargetLibsupc++ ] : be [ TargetLibstdc++ ] [ TargetLibsupc++ ]
; ;
if $(TARGET_PLATFORM) = libbe_test { if $(TARGET_PLATFORM) = libbe_test {

View File

@ -8,7 +8,7 @@ UsePrivateHeaders interface ;
Application LookAndFeel : Application LookAndFeel :
LookAndFeel.cpp LookAndFeel.cpp
: be [ TargetLibsupc++ ] : be [ TargetLibstdc++ ] [ TargetLibsupc++ ]
; ;
if $(TARGET_PLATFORM) = libbe_test { if $(TARGET_PLATFORM) = libbe_test {

View File

@ -7,6 +7,6 @@ UseHeaders [ FDirName os interface ] ;
Application MenuCrash : Application MenuCrash :
MenuCrash.cpp MenuCrash.cpp
: be [ TargetLibsupc++ ] : be [ TargetLibstdc++ ] [ TargetLibsupc++ ]
; ;

View File

@ -61,7 +61,7 @@ RSRCS=
# naming scheme you need to specify the path to the library # naming scheme you need to specify the path to the library
# and it's name # and it's name
# library: my_lib.a entry: my_lib.a or path/my_lib.a # library: my_lib.a entry: my_lib.a or path/my_lib.a
LIBS= be game LIBS= $(STDCPPLIBS) be game
# specify additional paths to directories following the standard # specify additional paths to directories following the standard
# libXXX.so or libXXX.a naming scheme. You can specify full paths # libXXX.so or libXXX.a naming scheme. You can specify full paths

View File

@ -10,7 +10,7 @@ Application Playground :
ObjectView.cpp ObjectView.cpp
ObjectWindow.cpp ObjectWindow.cpp
States.cpp States.cpp
: be [ TargetLibsupc++ ] localestub : be [ TargetLibstdc++ ] [ TargetLibsupc++ ] localestub
: Playground.rdef : Playground.rdef
; ;

View File

@ -7,7 +7,7 @@ UseHeaders [ FDirName os interface ] ;
SimpleTest PulsedDrawing : SimpleTest PulsedDrawing :
main.cpp main.cpp
: be [ TargetLibsupc++ ] ; : be [ TargetLibstdc++ ] [ TargetLibsupc++ ] ;
if ( $(TARGET_PLATFORM) = libbe_test ) { if ( $(TARGET_PLATFORM) = libbe_test ) {
HaikuInstall install-test-apps : $(HAIKU_APP_TEST_DIR) : PulsedDrawing HaikuInstall install-test-apps : $(HAIKU_APP_TEST_DIR) : PulsedDrawing

View File

@ -15,7 +15,7 @@ SimpleTest TestApp_Clock :
cl_view.cpp cl_view.cpp
cl_wind.cpp cl_wind.cpp
clock.cpp clock.cpp
: be localestub [ TargetLibsupc++ ] : be localestub [ TargetLibstdc++ ] [ TargetLibsupc++ ]
: Clock.rdef : Clock.rdef
; ;

View File

@ -4,5 +4,5 @@ AddSubDirSupportedPlatforms libbe_test ;
Application ResizeLimits : Application ResizeLimits :
ResizeLimits.cpp ResizeLimits.cpp
: be [ TargetLibsupc++ ] : be [ TargetLibstdc++ ] [ TargetLibsupc++ ]
; ;

View File

@ -1,28 +0,0 @@
#!/bin/sh
BASE=../../../../generated/tests/libbe_test/x86/apps
if [ ! -f $BASE/test_app_server ]; then
echo "You need to \"TARGET_PLATFORM=libbe_test jam install-test-apps\" first."
exit
fi
# launch registrar
$BASE/run_test_registrar || exit
# launch app_server
$BASE/test_app_server &
if [ "$#" -eq 0 ]; then
# no argument given, don't start any apps
exit
elif [ "$1" = "-o" ]; then
open $BASE
shift
fi
sleep 1
for i in $@; do
$BASE/$i &
done

28
src/tests/servers/app/run.sh Executable file
View File

@ -0,0 +1,28 @@
#!/bin/sh
if [ ! -f test_app_server ]; then
echo "You need to \"TARGET_PLATFORM=libbe_test jam -q install-test-apps\" first."
echo "Afterwards, make sure you head to the folder with the test_app_server and run the script installed there."
echo "If you need additional help, check in the \"NOTES\" file."
exit
fi
# launch registrar
run_test_registrar || exit
# launch app_server
test_app_server &
if [ "$#" -eq 0 ]; then
# no argument given, don't start any apps
exit
elif [ "$1" = "-o" ]; then
open .
shift
fi
sleep 1
for i in $@; do
$i &
done

View File

@ -7,7 +7,7 @@ UseHeaders [ FDirName os interface ] ;
SimpleTest ScrollBar : SimpleTest ScrollBar :
main.cpp main.cpp
: be [ TargetLibsupc++ ] ; : be [ TargetLibstdc++ ] [ TargetLibsupc++ ] ;
if ( $(TARGET_PLATFORM) = libbe_test ) { if ( $(TARGET_PLATFORM) = libbe_test ) {
HaikuInstall install-test-apps : $(HAIKU_APP_TEST_DIR) : ScrollBar HaikuInstall install-test-apps : $(HAIKU_APP_TEST_DIR) : ScrollBar

View File

@ -7,7 +7,7 @@ UseHeaders [ FDirName os interface ] ;
SimpleTest Scrolling : SimpleTest Scrolling :
main.cpp main.cpp
: be [ TargetLibsupc++ ] ; : be [ TargetLibstdc++ ] [ TargetLibsupc++ ] ;
#if ( $(TARGET_PLATFORM) = libbe_test ) { #if ( $(TARGET_PLATFORM) = libbe_test ) {
# HaikuInstall install-test-apps : $(HAIKU_APP_TEST_DIR) : Scrolling # HaikuInstall install-test-apps : $(HAIKU_APP_TEST_DIR) : Scrolling

View File

@ -7,7 +7,7 @@ UseHeaders [ FDirName os interface ] ;
SimpleTest ShapeTest : SimpleTest ShapeTest :
main.cpp main.cpp
: be [ TargetLibsupc++ ] : be [ TargetLibstdc++ ] [ TargetLibsupc++ ]
; ;
if ( $(TARGET_PLATFORM) = libbe_test ) { if ( $(TARGET_PLATFORM) = libbe_test ) {

View File

@ -8,7 +8,7 @@ UsePrivateHeaders interface ;
Application StackTileTest : Application StackTileTest :
main.cpp main.cpp
: [ TargetLibstdc++ ] be : [ TargetLibstdc++ ] [ TargetLibstdc++ ] be
; ;
if ( $(TARGET_PLATFORM) = libbe_test ) { if ( $(TARGET_PLATFORM) = libbe_test ) {

View File

@ -7,7 +7,7 @@ UseHeaders [ FDirName os interface ] ;
SimpleTest StatusBar : SimpleTest StatusBar :
main.cpp main.cpp
: be [ TargetLibsupc++ ] ; : be [ TargetLibstdc++ ] [ TargetLibsupc++ ] ;
if ( $(TARGET_PLATFORM) = libbe_test ) { if ( $(TARGET_PLATFORM) = libbe_test ) {
HaikuInstall install-test-apps : $(HAIKU_APP_TEST_DIR) : StatusBar HaikuInstall install-test-apps : $(HAIKU_APP_TEST_DIR) : StatusBar

View File

@ -7,7 +7,7 @@ UseHeaders [ FDirName os interface ] ;
SimpleTest TextRendering : SimpleTest TextRendering :
main.cpp main.cpp
: be [ TargetLibsupc++ ] ; : be [ TargetLibstdc++ ] [ TargetLibsupc++ ] ;
if ( $(TARGET_PLATFORM) = libbe_test ) { if ( $(TARGET_PLATFORM) = libbe_test ) {
HaikuInstall install-test-apps : $(HAIKU_APP_TEST_DIR) : TextRendering HaikuInstall install-test-apps : $(HAIKU_APP_TEST_DIR) : TextRendering

View File

@ -7,7 +7,7 @@ UseHeaders [ FDirName os interface ] ;
SimpleTest TextView : SimpleTest TextView :
main.cpp main.cpp
: be [ TargetLibsupc++ ] ; : be [ TargetLibstdc++ ] [ TargetLibsupc++ ] ;
#if ( $(TARGET_PLATFORM) = libbe_test ) { #if ( $(TARGET_PLATFORM) = libbe_test ) {
# HaikuInstall install-test-apps : $(HAIKU_APP_TEST_DIR) : TextView # HaikuInstall install-test-apps : $(HAIKU_APP_TEST_DIR) : TextView

View File

@ -10,7 +10,7 @@ SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src tests servers app harness ] ;
SimpleTest Transformation : SimpleTest Transformation :
harness.cpp harness.cpp
main.cpp main.cpp
: be [ TargetLibsupc++ ] : be [ TargetLibstdc++ ] [ TargetLibsupc++ ]
: Transformation.rdef : Transformation.rdef
; ;

View File

@ -7,7 +7,7 @@ UseHeaders [ FDirName os interface ] ;
Application ViewState : Application ViewState :
ViewState.cpp ViewState.cpp
: be [ TargetLibsupc++ ] : be [ TargetLibstdc++ ] [ TargetLibsupc++ ]
; ;
if $(TARGET_PLATFORM) = libbe_test { if $(TARGET_PLATFORM) = libbe_test {

View File

@ -7,6 +7,6 @@ UseHeaders [ FDirName os interface ] ;
Application ViewTransit : Application ViewTransit :
ViewTransit.cpp ViewTransit.cpp
: be [ TargetLibsupc++ ] : be [ TargetLibstdc++ ] [ TargetLibsupc++ ]
; ;

View File

@ -6,8 +6,9 @@
class TestApp : public BApplication { class TestApp : public BApplication {
public: public:
TestApp(const char *signature) TestApp(const char* signature)
: BApplication(signature) :
BApplication(signature)
{ {
} }
@ -15,18 +16,18 @@ public:
{ {
} }
virtual void ArgvReceived(int32 argc, char **argv) virtual void ArgvReceived(int32 argc, char** argv)
{ {
printf("TestApp::ArgvReceived(%ld)\n", argc); printf("TestApp::ArgvReceived(%" B_PRId32 ")\n", argc);
BMessage *message = CurrentMessage(); BMessage *message = CurrentMessage();
message->PrintToStream(); message->PrintToStream();
BMessenger returnAddress(message->ReturnAddress()); BMessenger returnAddress(message->ReturnAddress());
printf("team: %ld\n", returnAddress.Team()); printf("team: %" B_PRId32 "\n", returnAddress.Team());
for (int32 i = 0; i < argc; i++) for (int32 i = 0; i < argc; i++)
printf("arg %ld: `%s'\n", i, argv[i]); printf("arg %" B_PRId32 ": `%s'\n", i, argv[i]);
} }
virtual void RefsReceived(BMessage *message) virtual void RefsReceived(BMessage* message)
{ {
printf("TestApp::RefsReceived()\n"); printf("TestApp::RefsReceived()\n");
message->PrintToStream(); message->PrintToStream();
@ -44,9 +45,10 @@ public:
int int
main() main()
{ {
TestApp *app = new TestApp("application/x-vnd.OBOS-TestApp1"); TestApp* app = new TestApp("application/x-vnd.Haiku-TestApp1");
app->Run(); app->Run();
delete app; delete app;
return 0; return 0;
} }

View File

@ -1,9 +1,10 @@
// RosterShell.cpp // RosterShell.cpp
#include <iostream>
#include <sstream>
#include <stdio.h> #include <stdio.h>
#include <string> #include <string>
#include <string.h> #include <string.h>
#include <strstream>
#include <vector> #include <vector>
#include <iostream> #include <iostream>
@ -11,6 +12,9 @@
#include <Path.h> #include <Path.h>
#include <Roster.h> #include <Roster.h>
using std::string;
using std::vector;
const char kShellUsage[] = const char kShellUsage[] =
"Commands Parameters Description\n" "Commands Parameters Description\n"
"---------------------------------------------------------------------------\n" "---------------------------------------------------------------------------\n"
@ -29,13 +33,15 @@ const char kShellUsage[] =
class Shell { class Shell {
public: public:
Shell() Shell()
: fTerminating(false) :
fTerminating(false)
{ {
} }
bool IsTerminating() const { return fTerminating; } bool IsTerminating() const { return fTerminating; }
void DoCommand(vector<string> &cmdLine) void
DoCommand(vector<string>& cmdLine)
{ {
if (cmdLine.size() > 0) { if (cmdLine.size() > 0) {
string command = cmdLine[0]; string command = cmdLine[0];
@ -44,7 +50,7 @@ public:
else if (command == "exit" || command == "e") else if (command == "exit" || command == "e")
CmdExit(cmdLine); CmdExit(cmdLine);
else if (command == "help" || command == "h") else if (command == "help" || command == "h")
Usage(); Usage(string(" "));
else if (command == "launch") else if (command == "launch")
CmdLaunch(cmdLine); CmdLaunch(cmdLine);
else if (command == "list" || command == "l") else if (command == "list" || command == "l")
@ -58,43 +64,50 @@ public:
} }
} }
void Usage(string error = "") void
Usage(string error)
{ {
if (error.length() > 0) if (error.length() > 0)
cout << error << endl; std::cout << error << std::endl;
cout << kShellUsage; std::cout << kShellUsage;
} }
void CmdActivate(vector<string> &args) void
CmdActivate(vector<string>& args)
{ {
BRoster roster; BRoster roster;
// get a list of team IDs // get a list of team IDs
BList teamList; BList teamList;
if (args.size() <= 1) { if (args.size() <= 1) {
printf("activate: requires exactly one argument\n"); printf("activate: requires exactly one argument\n");
return; return;
} }
ParseTeamList(args, &teamList); ParseTeamList(args, &teamList);
int32 count = teamList.CountItems(); int32 count = teamList.CountItems();
if (count != 1) { if (count != 1) {
printf("activate: requires exactly one argument\n"); printf("activate: requires exactly one argument\n");
return; return;
} }
// activate the team // activate the team
team_id team = (team_id)(uintptr_t)teamList.ItemAt(0); team_id team = (team_id)(uintptr_t)teamList.ItemAt(0);
status_t error = roster.ActivateApp(team); status_t error = roster.ActivateApp(team);
if (error != B_OK) { if (error != B_OK) {
printf("activate: failed to activate application %ld: %s\n", printf("activate: failed to activate application %" B_PRId32
team, strerror(error)); ": %s\n", team, strerror(error));
} }
} }
void CmdExit(vector<string> &) void
CmdExit(vector<string>&)
{ {
fTerminating = true; fTerminating = true;
} }
void CmdLaunch(vector<string> &args) void
CmdLaunch(vector<string>& args)
{ {
// check args // check args
if (args.size() != 2) { if (args.size() != 2) {
@ -118,32 +131,37 @@ public:
team_id teamID; team_id teamID;
error = roster.Launch(&ref, (const BMessage*)NULL, &teamID); error = roster.Launch(&ref, (const BMessage*)NULL, &teamID);
if (error == B_OK) { if (error == B_OK) {
printf("launched \"%s\", team id: %ld\n", program.c_str(), teamID); printf("launched \"%s\", team id: %" B_PRId32 "\n", program.c_str(),
teamID);
} else { } else {
printf("launch: Failed to launch \"%s\": %s\n", printf("launch: Failed to launch \"%s\": %s\n",
program.c_str(), strerror(error)); program.c_str(), strerror(error));
} }
} }
static void ParseTeamList(vector<string> &args, BList *teamList) static void
ParseTeamList(vector<string>& args, BList* teamList)
{ {
for (int32 i = 1; i < (int32)args.size(); i++) { for (int32 i = 1; i < (int32)args.size(); i++) {
string arg = args[i]; string arg = args[i];
team_id team = -1; team_id team = -1;
if (sscanf(arg.c_str(), "%ld", &team) > 0) if (sscanf(arg.c_str(), "%" B_PRId32, &team) > 0)
teamList->AddItem((void*)team); teamList->AddItem((void*)(addr_t)team);
} }
} }
void CmdList(vector<string> &args) void
CmdList(vector<string>& args)
{ {
BRoster roster; BRoster roster;
// get a list of team IDs // get a list of team IDs
BList teamList; BList teamList;
if (args.size() > 1) if (args.size() > 1)
ParseTeamList(args, &teamList); ParseTeamList(args, &teamList);
else else
roster.GetAppList(&teamList); roster.GetAppList(&teamList);
// print an info for each team // print an info for each team
int32 count = teamList.CountItems(); int32 count = teamList.CountItems();
printf("%-8s%-40s\n", "team", "signature"); printf("%-8s%-40s\n", "team", "signature");
@ -153,37 +171,40 @@ public:
app_info info; app_info info;
status_t error = roster.GetRunningAppInfo(team, &info); status_t error = roster.GetRunningAppInfo(team, &info);
if (error == B_OK) if (error == B_OK)
printf("%-8ld%-40s\n", team, info.signature); printf("%-8" B_PRId32 "%-40s\n", team, info.signature);
else { else {
printf("%-8ldfailed to get the app_info: %s\n", team, printf("%-8" B_PRId32 "failed to get the app_info: %s\n", team,
strerror(error)); strerror(error));
} }
} }
printf("\n"); printf("\n");
} }
void CmdListLong(vector<string> &args) void
CmdListLong(vector<string>& args)
{ {
BRoster roster; BRoster roster;
// get a list of team IDs // get a list of team IDs
BList teamList; BList teamList;
if (args.size() > 1) if (args.size() > 1)
ParseTeamList(args, &teamList); ParseTeamList(args, &teamList);
else else
roster.GetAppList(&teamList); roster.GetAppList(&teamList);
// print an info for each team // print an info for each team
int32 count = teamList.CountItems(); int32 count = teamList.CountItems();
for (int32 i = 0; i < count; i++) { for (int32 i = 0; i < count; i++) {
team_id team = (team_id)(uintptr_t)teamList.ItemAt(i); team_id team = (team_id)(uintptr_t)teamList.ItemAt(i);
printf("team %8ld\n", team); printf("team %8" B_PRId32 "\n", team);
printf("-------------\n"); printf("-------------\n");
app_info info; app_info info;
status_t error = roster.GetRunningAppInfo(team, &info); status_t error = roster.GetRunningAppInfo(team, &info);
if (error == B_OK) { if (error == B_OK) {
printf("signature: %s\n", info.signature); printf("signature: %s\n", info.signature);
printf("thread: %ld\n", info.thread); printf("thread: %" B_PRId32 "\n", info.thread);
printf("port: %ld\n", info.port); printf("port: %" B_PRId32 "\n", info.port);
printf("flags: 0x%lx\n", info.flags); printf("flags: 0x%" B_PRIx32 "\n", info.flags);
printf("file: %s\n", BPath(&info.ref).Path()); printf("file: %s\n", BPath(&info.ref).Path());
} else } else
printf("failed to get the app_info: %s\n", strerror(error)); printf("failed to get the app_info: %s\n", strerror(error));
@ -191,7 +212,8 @@ public:
} }
} }
void CmdQuit(vector<string> &args) void
CmdQuit(vector<string>& args)
{ {
BRoster roster; BRoster roster;
// get a list of team IDs // get a list of team IDs
@ -200,12 +222,14 @@ public:
printf("quit: requires at least one argument\n"); printf("quit: requires at least one argument\n");
return; return;
} }
ParseTeamList(args, &teamList); ParseTeamList(args, &teamList);
int32 count = teamList.CountItems(); int32 count = teamList.CountItems();
if (count < 1) { if (count < 1) {
printf("quit: requires at least one argument\n"); printf("quit: requires at least one argument\n");
return; return;
} }
// send a B_QUIT_REQUESTED message to each team // send a B_QUIT_REQUESTED message to each team
for (int32 i = 0; i < count; i++) { for (int32 i = 0; i < count; i++) {
team_id team = (team_id)(uintptr_t)teamList.ItemAt(i); team_id team = (team_id)(uintptr_t)teamList.ItemAt(i);
@ -215,12 +239,12 @@ public:
error = messenger.SendMessage(B_QUIT_REQUESTED); error = messenger.SendMessage(B_QUIT_REQUESTED);
if (error != B_OK) { if (error != B_OK) {
printf("quit: failed to deliver the B_QUIT_REQUESTED " printf("quit: failed to deliver the B_QUIT_REQUESTED "
"message to team %ld\n", team); "message to team %" B_PRId32 "\n", team);
printf(" %s\n", strerror(error)); printf(" %s\n", strerror(error));
} }
} else { } else {
printf("quit: failed to create a messenger for team %ld\n", printf("quit: failed to create a messenger for team %" B_PRId32
team); "\n", team);
printf(" %s\n", strerror(error)); printf(" %s\n", strerror(error));
} }
} }
@ -233,11 +257,18 @@ private:
// read_line // read_line
bool bool
read_line(char *line, size_t size) read_line(char* line, size_t size)
{ {
cout << "roster> "; std::cout << "roster> ";
cout.flush(); std::cout.flush();
return cin.getline(line, size);
try {
std::cin.getline(line, size);
} catch (const std::exception &ex) {
return false;
}
return true;
} }
// main // main
@ -245,11 +276,12 @@ int
main() main()
{ {
Shell shell; Shell shell;
// main input loop // main input loop
char line[10240]; char line[10240];
while (!shell.IsTerminating() && read_line(line, sizeof(line))) { while (!shell.IsTerminating() && read_line(line, sizeof(line))) {
// parse args // parse args
istrstream in(line); std::istringstream in(line);
vector<string> args; vector<string> args;
string arg; string arg;
while (in >> arg) while (in >> arg)
@ -257,6 +289,7 @@ main()
// invoke command // invoke command
shell.DoCommand(args); shell.DoCommand(args);
} }
return 0; return 0;
} }