-
Notifications
You must be signed in to change notification settings - Fork 8
/
Jamroot.jam
executable file
·1130 lines (970 loc) · 29.7 KB
/
Jamroot.jam
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
import os ;
using testing ;
import pch ;
SKIP_SNEAKY_TESTS = [ os.environ SKIP_SNEAKY_TESTS ] ;
VERSION_STRING = [ os.environ VERSION_STRING ] ;
if ! $(VERSION_STRING) {
VERSION_STRING = "_v" ;
}
local WHEEZY = [ SHELL "cat /etc/*-release 2>&1 | grep wheezy" ] ;
local EXE_LINK_FLAGS = "" ;
local COMPILER_FLAGS = "" ;
if $(WHEEZY) != "" {
EXE_LINK_FLAGS = " -static-libstdc++ -L/home/vagrant/. -L/lib/. -L/usr/lib/gcc/x86_64-linux-gnu/4.7/. -pthread -ldl" ;
COMPILER_FLAGS = "-std=c++0x -Werror -Wno-error=strict-aliasing -Wno-error=deprecated-declarations -DNOVA_GUEST_WHEEZY -DNOVA_GUEST_VERSION=\"\\\"$(VERSION_STRING)\\\"\" " ;
} else {
EXE_LINK_FLAGS = " -static-libgcc -L/home/vagrant/. -L/lib/. -L/usr/lib/gcc/x86_64-linux-gnu/4.4.3/. -lpthread -ldl" ;
COMPILER_FLAGS = "-std=c++0x -Werror -Wno-error=strict-aliasing -Wno-error=deprecated-declarations -DNOVA_GUEST_VERSION=\"\\\"$(VERSION_STRING)\\\"\" " ;
}
###############################################################################
# Project Settings
###############################################################################
project
: requirements
<include>src
<include>/usr/include
<include>/opt/sp-deps/libcurl/include
<include>$(BOOST_ROOT)
<variant>debug:<define>_DEBUG
# The line below makes the Process class print all output.
<define>_NOVA_PROCESS_VERBOSE
#TODO: Add -Wall -Wextra
#TODO(jcru): Remove '-Wno-error=deprecated-declarations'
# Kept getting auto_ptr deprecated error for greedy_pete.cc
<cxxflags>$(COMPILER_FLAGS)
# Enable the very little bit of C++0x functionality available in GCC
# 4.4.5 and turn warnings into errors except for strict-aliasing, which
# unfortunatley issues false warnings as verified here:
# http://stackoverflow.com/questions/15520642/using-stdmap-gives-warning-dereferencing-pointer-anonymous-does-break-str
;
# This meta-target is a precompiled header. Using it shaves a little bit of
# time off the build process. Nothing mind-blowing but every little bit helps.
cpp-pch pch
: src/pch.hpp
: <cxxflags>" -std=c++0x"
;
# A quick note about linking and the flags defined below.
# First, some libraries are included via Boost Build, while others are stated
# as flags to GCC directly. In the later case its because the given libraries
# won't "just work" in any configuration, and to build statically we must
# explicitly set them one way or another.
#
# These are pthread and dl.
#
# Next, statically linking the gcc lib is kind of tough. According to this:
# http://www.trilithium.com/johan/2005/06/static-libstdc/
# If gcc cannot find libgcc on the path, it will not statically link and
# will quietly give you a bigger executable. Exciting!
# The solution is "-static-libgcc" along with some of the stranger flags
# seen below.
#
# Debian wheezy has a newer version of gcc (4.7) with '-static-libstdc++'
###############################################################################
# Dependencies
###############################################################################
# System libraries are found automatically by our toolset (GCC).
# So for example, if you pass "-lrabbitmq" to gcc, here its "<name>rabbitmq."
# Some libraries can't be staticly linked for various reasons.
# So we create aliases of them which we refer to them by, which force them to
# be dynamically linked.
lib lib_boost_thread : : <name>boost_thread ;
lib lib_boost_unit_test_framework : : <name>boost_unit_test_framework ;
lib lib_confuse : : <name>confuse ;
lib lib_json : : <name>json ;
lib lib_mysqlclient : : <name>mysqlclient ;
lib lib_rabbitmq : : <name>rabbitmq ;
lib lib_rt : : <name>rt ;
lib lib_uuid : : <name>uuid ;
alias dependencies
: lib_json lib_rabbitmq lib_uuid lib_confuse lib_boost_thread
;
lib lib_pthread : : <name>pthread ; # Seems to only be needed in static builds
# static builds also require lib_c.
lib lib_m : : <name>m ;
lib lib_stdc++ : : <name>stdc++ ;
local WHEEZY = [ SHELL "cat /etc/*-release 2>&1 | grep wheezy" ] ;
if $(WHEEZY) != "" {
lib lib_z : : <name>z ;
} else {
lib lib_z : : <file>/usr/lib/libz.so.1 ;
}
# ubuntu specific
#lib lib_z : : <file>/lib/x86_64-linux-gnu/libz.so.1 ;
lib lib_c : : <name>c ;
local WHEEZY = [ SHELL "cat /etc/*-release 2>&1 | grep wheezy" ] ;
if $(WHEEZY) != "" {
lib lib_mysqlclient_r : : <file>/usr/lib/x86_64-linux-gnu/libmysqlclient_r.so.18.0.0 ;
} else {
lib lib_mysqlclient_r : : <file>/usr/lib/libmysqlclient.so.16.0.0 ;
}
# Note: In Ubuntu, use this:
# lib lib_mysqlclient_r :
# : <file>/usr/lib/x86_64-linux-gnu/libmysqlclient_r.so.18.0.0 ;
lib lib_ssl : : <name>ssl ;
# Needed for curl.
lib lib_crypto : : <name>crypto ;
# lib lib_dl : : <name>dl ; # <-- NOT the way to include libdl, see below.
# This is expected to be installed by the initialize process.
# TODO: (rmyers) make the statically linked curl work
lib lib_curl : : <file>"/opt/sp-deps/libcurl/lib/libcurl.a" ;
# Curl is a tricky dependency and will not compile statically unless it finds
# all of its buddies. Additionally, -ldl must be specified last on the linker
# line, so making it a lib target in Boost Build doesn't work.
lib lib_hiredis : : <name>hiredis ;
lib lib_idn11 : : <name>idn ;
alias static_dependencies
: dependencies
;
alias test_dependencies
: lib_boost_unit_test_framework lib_boost_thread
;
###############################################################################
# Custom Rule "Unit"
###############################################################################
# The rule "unit" lets us define a target related to a single object file which
# usually comes from one C++ source file, along with the source code for its
# unit tests.
#
# We could just have used the built-in "obj" rule, but this automatically adds
# a dependency on the precompiled header and also lets us optionally define
# a "unit-test" target by specifying the test sources, which is nice.
#
# Also, the resulting target isn't an "obj" but an "alias" to an obj.
# Because we compile a (very few) unit tests with different properties,
# Boost's gives an error that we're duplicating a target names if they use the
# same objs. This is a safety feature used to avoid compiling the code in
# potentially different ways each builds (though here it doesn't matter):
# http://www.boost.org/boost-build2/doc/html/bbv2/faq/s02.html
# "alias" creates a unique target but ensures we only build the obj file once.
#
# Note also that unfortunately, the tests need to link to Boost Test
# dynamically, which means if you run the build with "link=static" some objects
# will also be built as "link=shared" to meet this requirement.
#
# Tests can be avoided by specifying a specific target when running bjam (i.e.
# sneaky-pete) or setting the environment variable SKIP_SNEAKY_TESTS.
#
# Note: This rule used to enforce that the unit tests were run for each
# object, but to do this it had to build the obj twice. This made things too
# slow and wasn't worth it.
local rule unit ( name : sources * : dependencies * : test-sources *
: test-properties * : env-vars * : main-properties * )
{
obj __unit_obj_$(name) : pch $(sources)
: $(main-properties) ;
alias $(name) : __unit_obj_$(name) $(dependencies) ;
if ! $(SKIP_SNEAKY_TESTS) && $(test-sources) > []
{
unit-test unit_test_$(name)
: pch
__unit_obj_$(name)
$(test-sources)
test_dependencies
$(dependencies)
: <define>BOOST_TEST_DYN_LINK
<testing.launcher>"BOOST_TEST_CATCH_SYSTEM_ERRORS=no $(env-vars) valgrind --leak-check=full"
$(test-properties)
<link>shared
;
}
}
###############################################################################
# Core Library and Unit Tests.
###############################################################################
unit u_nova_Log_limited
: src/nova/Log.cc
;
unit u_nova_Log
: u_nova_Log_limited
src/nova/Log_rotate_files.cc
pch
: u_nova_guest_utils
u_nova_utils_io
lib_boost_thread
: tests/log_tests.cc
u_nova_utils_regex
;
unit u_nova_guest_GuestException
: src/nova/guest/GuestException.cc
;
unit u_nova_utils_regex
: src/nova/utils/regex.cc
:
: tests/nova/utils/regex_tests.cc
;
unit u_nova_flags
: src/nova/flags.cc
: u_nova_guest_GuestException
u_nova_utils_regex
: tests/nova/flags_tests.cc
;
unit u_nova_configfile
: src/nova/configfile.cc
: lib_confuse
u_nova_guest_GuestException
: tests/configfile_tests.cc
;
unit u_nova_utils_io
: src/nova/utils/io.cc
: lib_rt
u_nova_Log_limited # The full version has a dependency on this module.
;
unit u_nova_json
: src/nova/json.cc
: lib_json
: tests/nova/json_tests.cc
;
unit u_nova_utils_Md5
: src/nova/utils/Md5.cc
: lib_ssl
: tests/nova/utils/Md5_tests.cc
;
unit u_nova_utils_Curl
: src/nova/utils/Curl.cc
: lib_curl
lib_idn11
lib_crypto
lib_ssl
lib_z
#lib_dl
;
unit u_nova_utils_subsecond
: src/nova/utils/subsecond.cc
:
;
unit u_nova_utils_swift
: src/nova/utils/swift.cc
: u_nova_utils_Curl
u_nova_utils_Md5
u_nova_Log
: tests/nova/utils/swift_tests.cc
;
unit u_nova_db_mysql
: src/nova/db/mysql.cc
: lib_z # <-- needed by lib_mysqlclient
lib_mysqlclient
u_nova_Log
;
unit u_nova_guest_utils
: src/nova/guest/utils.cc
: u_nova_guest_GuestException
;
unit u_nova_utils_threads
: src/nova/utils/threads.cc
: u_nova_Log
: tests/nova/utils/threads_tests.cc
;
unit u_nova_utils_zlib
: src/nova/utils/zlib.cc
: u_nova_Log
lib_z
: tests/nova/utils/zlib_tests.cc
;
exe parrot_e
: u_nova_Log
tests/nova/parrot.cc
pch
: <linkflags>$(EXE_LINK_FLAGS)
;
install parrot : parrot_e/<link>shared ;
unit u_nova_process
: src/nova/process.cc
: u_nova_utils_io
u_nova_Log
: tests/nova/process_tests.cc
: <dependency>parrot/<link>shared
<define>_NOVA_PROCESS_VERBOSE
: BOOST_TEST_CATCH_SYSTEM_ERRORS=no
;
unit u_nova_utils_ls
: src/nova/utils/ls.cc
;
unit u_nova_datastores_DatastoreStatus
: src/nova/datastores/DatastoreStatus.cc
: u_nova_rpc_Sender
: tests/nova/datastores/DatastoreStatus_tests.cc
;
unit u_nova_datastores_DatastoreException
: src/nova/datastores/DatastoreException.cc
;
unit u_nova_datastores_DatastoreApp
: src/nova/datastores/DatastoreApp.cc
: u_nova_datastores_DatastoreException
u_nova_datastores_DatastoreStatus
u_nova_process
;
unit u_nova_guest_apt_AptException
: src/nova/guest/apt/AptException.cc
;
unit u_nova_guest_apt_apt
: src/nova/guest/apt/apt.cc
: u_nova_Log
u_nova_guest_apt_AptException
u_nova_utils_io
u_nova_process
u_nova_utils_regex
;
unit u_nova_guest_apt_AptMessageHandler
: src/nova/guest/apt/AptMessageHandler.cc
: # lib_json # <-- this should be automatic...
u_nova_guest_apt_apt
u_nova_guest_apt_AptException
u_nova_guest_GuestException
u_nova_json
u_nova_Log
: tests/nova/guest/apt_json_tests.cc
;
unit u_nova_rpc_amqp
: src/nova/rpc/amqp.cc
: lib_rabbitmq
;
unit u_nova_rpc_ResilientConnection
: src/nova/rpc/ResilientConnection.cc
: u_nova_rpc_amqp
u_nova_Log
;
unit u_nova_rpc_Sender
: src/nova/rpc/Sender.cc
: u_nova_rpc_ResilientConnection
u_nova_json
u_nova_utils_subsecond
;
unit u_nova_rpc_Receiver
: src/nova/rpc/Receiver.cc
: u_nova_rpc_ResilientConnection
u_nova_Log
;
unit u_nova_volume
: src/nova/VolumeManager.cc
: u_nova_Log
u_nova_process
: tests/nova/guest/volume_tests.cc
: <define>BOOST_TEST_DYN_LINK
<testing.launcher>"BOOST_TEST_CATCH_SYSTEM_ERRORS=no "
;
unit u_nova_guest_common_PrepareHandler
: src/nova/guest/common/PrepareHandler.cc
: u_nova_guest_apt_apt
u_nova_datastores_DatastoreStatus
u_nova_guest_GuestException
u_nova_volume
;
unit u_nova_guest_mysql_MySqlGuestException
: src/nova/guest/mysql/MySqlGuestException.cc
;
unit u_nova_guest_mysql_MySqlDatabase
: src/nova/guest/mysql/MySqlDatabase.cc
;
unit u_nova_guest_mysql_MySqlUser
: src/nova/guest/mysql/MySqlUser.cc
;
unit u_nova_guest_mysql_MySqlUserAttr
: src/nova/guest/mysql/MySqlUserAttr.cc
;
unit u_nova_guest_mysql_MySqlAdmin
: src/nova/guest/mysql/MySqlAdmin.cc
: lib_uuid
u_nova_utils_io
u_nova_Log
u_nova_db_mysql
u_nova_utils_regex
u_nova_guest_mysql_MySqlDatabase
u_nova_guest_mysql_MySqlGuestException
u_nova_guest_mysql_MySqlUser
u_nova_guest_mysql_MySqlUserAttr
: tests/nova/guest/mysql/MySqlAdminTests.cc
;
unit u_nova_guest_mysql_MySqlAppStatus
: src/nova/guest/mysql/MySqlAppStatus.cc
: lib_boost_thread
u_nova_datastores_DatastoreStatus
u_nova_utils_io
u_nova_process
u_nova_guest_utils
u_nova_utils_regex
: tests/nova/guest/mysql/MySqlAppStatus_tests.cc
;
unit u_nova_guest_mysql_MySqlApp
: src/nova/guest/mysql/MySqlApp.cc
: u_nova_guest_mysql_MySqlAdmin
u_nova_guest_apt_apt
u_nova_guest_apt_AptException
u_nova_configfile
u_nova_datastores_DatastoreApp
u_nova_guest_mysql_MySqlAppStatus
u_nova_guest_mysql_MySqlBackupRestoreManager
;
unit u_nova_guest_diagnostics_Interrogator
: src/nova/guest/diagnostics/Interrogator.cc
: u_nova_Log
u_nova_guest_diagnostics_InterrogatorException
u_nova_utils_io
u_nova_utils_regex
: tests/nova/guest/diag_tests.cc
:
:
:
;
unit u_nova_guest_diagnostics_InterrogatorException
: src/nova/guest/diagnostics/InterrogatorException.cc
: u_nova_guest_GuestException
;
unit u_nova_guest_diagnostics_InterrogatorMessageHandler
: src/nova/guest/diagnostics/InterrogatorMessageHandler.cc
: # lib_json # <-- this should be automatic...
u_nova_guest_diagnostics_Interrogator
u_nova_guest_GuestException
u_nova_json
u_nova_Log
:
:
:
:
;
unit u_nova_guest_diagnostics_DiagnosticsMessageHandler
: src/nova/guest/diagnostics/DiagnosticsMessageHandler.cc
;
unit u_nova_backup_BackupException
: src/nova/backup/BackupException.cc
: u_nova_guest_GuestException
;
unit u_nova_backup_BackupManager
: src/nova/backup/BackupManager.cc
: u_nova_Log
u_nova_backup_BackupException
u_nova_utils_regex
u_nova_utils_swift
;
unit u_nova_guest_mysql_MySqlBackupManager
: src/nova/guest/mysql/MySqlBackupManager.cc
: u_nova_Log
u_nova_backup_BackupException
u_nova_backup_BackupManager
u_nova_utils_io
u_nova_utils_regex
u_nova_utils_zlib
;
unit u_nova_backup_BackupRestore
: src/nova/backup/BackupRestore.cc
: u_nova_Log
u_nova_backup_BackupException
u_nova_process
;
unit u_nova_guest_mysql_MySqlBackupRestoreManager
: src/nova/guest/mysql/MySqlBackupRestoreManager.cc
: u_nova_backup_BackupRestore
u_nova_process
u_nova_utils_ls
u_nova_utils_regex
u_nova_utils_swift
u_nova_utils_zlib
;
unit u_nova_guest_backup_BackupMessageHandler
: src/nova/guest/backup/BackupMessageHandler.cc
: # lib_json # <-- this should be automatic...
u_nova_guest_diagnostics_Interrogator
:
:
:
:
;
unit u_nova_guest_monitoring_Status
: src/nova/guest/monitoring/status.cc
: u_nova_Log
;
unit u_nova_guest_monitoring_Monitoring
: src/nova/guest/monitoring/Monitoring.cc
: u_nova_Log
u_nova_guest_apt_apt
u_nova_guest_monitoring_MonitoringException
u_nova_utils_io
u_nova_utils_regex
: #tests/nova/guest/diag_tests.cc
:
:
:
;
unit u_nova_guest_monitoring_MonitoringException
: src/nova/guest/monitoring/MonitoringException.cc
: u_nova_guest_GuestException
;
unit u_nova_guest_monitoring_MonitoringMessageHandler
: src/nova/guest/monitoring/MonitoringMessageHandler.cc
: # lib_json # <-- this should be automatic...
u_nova_guest_monitoring_Monitoring
u_nova_guest_monitoring_Status
u_nova_guest_GuestException
u_nova_json
u_nova_Log
:
:
:
:
;
unit u_nova_guest_mysql_MySqlMessageHandler
: src/nova/guest/mysql/MySqlMessageHandler.cc
: u_nova_guest_apt_apt
u_nova_guest_apt_AptException
u_nova_guest_common_PrepareHandler
u_nova_json
u_nova_db_mysql
u_nova_guest_mysql_MySqlAdmin
u_nova_guest_mysql_MySqlAppStatus
u_nova_guest_mysql_MySqlApp
u_nova_guest_monitoring_Monitoring
u_nova_volume
;
unit u_nova_guest_agent
: src/nova/guest/agent.cc
;
unit u_redis_config
: src/nova/guest/redis/config.cc
;
unit u_nova_redis_RedisException
: src/nova/redis/RedisException.cc
;
unit u_nova_redis_RedisClient
: src/nova/redis/RedisClient.cc
: lib_hiredis
u_redis_config
u_nova_redis_RedisException
u_nova_Log
;
unit u_nova_redis_RedisAppStatus
: src/nova/redis/RedisAppStatus.cc
: u_nova_datastores_DatastoreStatus
u_nova_redis_RedisClient
;
unit u_nova_redis_RedisBackup
: src/nova/redis/RedisBackup.cc
: u_nova_guest_common_PrepareHandler
u_nova_utils_ls
u_nova_redis_RedisClient
u_nova_redis_RedisException
u_nova_backup_BackupException
u_nova_backup_BackupManager
u_nova_backup_BackupRestore
u_redis_config
;
unit u_nova_redis_RedisApp
: src/nova/redis/RedisApp.cc
: u_nova_guest_common_PrepareHandler
u_nova_datastores_DatastoreApp
u_nova_redis_RedisBackup
u_nova_redis_RedisException
u_redis_config
;
unit u_nova_guest_redis_message_handler
: src/nova/guest/redis/message_handler.cc
: u_nova_redis_RedisApp
u_nova_guest_apt_apt
u_nova_guest_apt_AptException
u_nova_guest_apt_AptMessageHandler
u_nova_json
u_nova_db_mysql
u_nova_guest_monitoring_Monitoring
u_nova_guest_monitoring_MonitoringMessageHandler
u_nova_backup_BackupRestore
u_nova_volume
u_redis_config
u_nova_redis_RedisAppStatus
;
alias empty_agent_lib
: pch
u_nova_flags
u_nova_guest_agent
u_nova_guest_utils
u_nova_json
u_nova_Log
u_nova_rpc_Receiver
u_nova_utils_regex
u_nova_rpc_Sender
u_nova_utils_threads
;
alias mysql_agent_lib
: empty_agent_lib
u_nova_configfile
u_nova_guest_apt_apt
u_nova_guest_apt_AptMessageHandler
u_nova_guest_apt_AptException
u_nova_guest_diagnostics_DiagnosticsMessageHandler
u_nova_guest_diagnostics_Interrogator
u_nova_guest_diagnostics_InterrogatorException
u_nova_guest_diagnostics_InterrogatorMessageHandler
u_nova_guest_mysql_MySqlBackupManager
u_nova_backup_BackupException
u_nova_guest_backup_BackupMessageHandler
u_nova_utils_swift
u_nova_guest_monitoring_Status
u_nova_guest_monitoring_Monitoring
u_nova_guest_monitoring_MonitoringException
u_nova_guest_monitoring_MonitoringMessageHandler
u_nova_guest_mysql_MySqlMessageHandler
;
###############################################################################
# Functional Tests
###############################################################################
# Doesn't require anything other than apt-get on the machine, but is brittle.
unit-test apt_tests
: pch
u_nova_guest_apt_apt
u_nova_flags
tests/nova/guest/apt_tests.cc
test_dependencies
: <define>_VERBOSE_NOVA_GUEST_APT
# Boost fails this test because a process returns a non-zero exit code.
# Its a bug thats been fixed in recent versions.
#http://stackoverflow.com/questions/5325202/boostunit-test-case-fails-because-a-child-process-exits-with-nonzero
<define>BOOST_TEST_DYN_LINK
<testing.launcher>"BOOST_TEST_CATCH_SYSTEM_ERRORS=no "
#" valgrind --leak-check=full"
;
explicit apt_tests ;
# Requires RabbitMQ server to be installed and running on localhost.
unit-test send_and_receive
: pch
u_nova_flags
u_nova_guest_GuestException
u_nova_rpc_Receiver
u_nova_rpc_Sender
u_nova_json
tests/send_and_receive.cc
test_dependencies
: <define>BOOST_TEST_DYN_LINK
<testing.launcher>"BOOST_TEST_CATCH_SYSTEM_ERRORS=no valgrind --leak-check=full"
;
explicit send_and_receive ;
# Requires RabbitMQ server to be installed and running on localhost.
unit-test resilient_tests
: pch
u_nova_flags
u_nova_guest_GuestException
u_nova_rpc_Receiver
u_nova_rpc_Sender
u_nova_json
tests/resilient_tests.cc
test_dependencies
: <define>BOOST_TEST_DYN_LINK
<testing.launcher>"BOOST_TEST_CATCH_SYSTEM_ERRORS=no valgrind --leak-check=full --track-origins=yes -v"
;
explicit resilient_tests ;
# Requires MySQL to be installed with valid values in my.cnf.
# Run by setting an environment variable named "TEST_ARGS" to whatever nova
# flag settings you need (such as "--flagfile=blah.conf").
unit-test int_tests_mysql
: pch
u_nova_Log
#u_nova_guest_apt_apt
#u_nova_guest_apt_AptException
u_nova_flags
u_nova_db_mysql
tests/nova/guest/mysql/mysql_integration_simple_tests.cc
test_dependencies
: <define>BOOST_TEST_DYN_LINK
<testing.launcher>"BOOST_TEST_CATCH_SYSTEM_ERRORS=no valgrind --leak-check=full"
;
explicit int_tests_mysql ;
# Requires that mysql be utterly destroyed and reinstalled on the machine.
# TODO(tim.simpson) Reddwarf integration testing always tests this so I may
# remove it, since its so difficult to run and may just turn into an out-of-date
# pitfall for someone trying to run this code.
unit-test int_tests
: pch
u_nova_flags
u_nova_Log
#u_nova_guest_apt_apt
#u_nova_guest_apt_AptException
u_nova_guest_mysql_MySqlApp
tests/nova/guest/mysql/mysql_integration_tests.cc
test_dependencies
: <define>BOOST_TEST_DYN_LINK
<testing.launcher>"BOOST_TEST_CATCH_SYSTEM_ERRORS=no valgrind --leak-check=full"
;
explicit int_tests ;
# TODO(tim.simpson): Remove this. The results don't seem that usable anymore.
run dependencies
mysql_agent_lib
test_dependencies
tests/memory_tests.cc
: # Command line arguments.
: # input files (?)
: <define>BOOST_TEST_DYN_LINK
: memory_tests # <-- The target name is placed here, for some reason. :(
;
explicit memory_tests ;
###############################################################################
# Binaries
###############################################################################
exe nova_guest_diagnostics_interrogator_demo
: u_nova_guest_diagnostics_Interrogator
u_nova_flags
u_nova_Log
tests/nova/guest/diag_demo.cc
pch
: <linkflags>$(EXE_LINK_FLAGS)
;
exe nova_guest_utils_demo
: u_nova_guest_utils
u_nova_flags
u_nova_Log
tests/nova/guest/utils_demo.cc
pch
: <linkflags>$(EXE_LINK_FLAGS)
;
exe nova_process_fd_demo
: pch
u_nova_guest_utils
u_nova_flags
u_nova_Log
u_nova_process
lib_boost_thread
tests/nova/process_fd_demo.cc
: <linkflags>$(EXE_LINK_FLAGS)
;
exe redis_backup_demo
: pch
u_nova_guest_diagnostics_Interrogator
u_nova_utils_swift
u_nova_redis_RedisBackup
u_nova_redis_RedisClient
u_nova_guest_common_PrepareHandler
u_nova_redis_RedisException
u_nova_backup_BackupException
u_nova_backup_BackupManager
u_nova_backup_BackupRestore
u_nova_utils_regex
tests/redis_backup_demo.cc
: <linkflags>$(EXE_LINK_FLAGS)
;
exe apt_install
: pch
u_nova_Log
u_nova_guest_apt_apt
u_nova_guest_apt_AptException
tests/nova/guest/apt_install.cc
u_nova_utils_io
u_nova_process
u_nova_utils_regex
lib_rt
: <define>_NOVA_PROCESS_VERBOSE
;
explicit apt_install ;
unit obj_mysql_agent
: src/mysql_agent.cc
;
exe receiver
: pch
dependencies
mysql_agent_lib
obj_mysql_agent
: <linkflags>$(EXE_LINK_FLAGS)
;
exe empty-guest
: static_dependencies
empty_agent_lib
src/example_agent.cc
lib_m
lib_c
pch
: <linkflags>$(EXE_LINK_FLAGS)
;
exe sneaky-pete-mysql
: static_dependencies
mysql_agent_lib
obj_mysql_agent
lib_m
lib_c
pch
: <linkflags>$(EXE_LINK_FLAGS)
;
exe sneaky-pete-redis
: static_dependencies
empty_agent_lib
u_nova_guest_redis_message_handler
u_nova_datastores_DatastoreStatus
u_nova_guest_diagnostics_Interrogator
u_nova_guest_diagnostics_InterrogatorMessageHandler
u_nova_guest_backup_BackupMessageHandler
u_nova_redis_RedisBackup
src/redis_agent.cc
lib_m
lib_c
pch
: <linkflags>$(EXE_LINK_FLAGS)
;
# Run this in Valgrind to find possible leaks.
exe leak_tester
: pch
dependencies
mysql_agent_lib
src/leak_tester.cc
: #<link>shared:<dependency>sql_guest_tests
#<link>shared:<dependency>memory_tests
;
# Run this to find out how much memory is availble in the container
exe greedy_pete
: pch
u_nova_guest_diagnostics_Interrogator
src/greedy_pete.cc
:
<linkflags>$(EXE_LINK_FLAGS)
;
explicit leak_tester ;
exe redis_client_demo
: pch
tests/redis_client_demo.cc
u_nova_redis_RedisClient
: <linkflags>$(EXE_LINK_FLAGS)
;
exe upload_file
: pch
tests/upload_file.cc
u_nova_utils_swift
u_nova_utils_Md5
u_nova_Log
: <linkflags>$(EXE_LINK_FLAGS)
;
exe download_file
: pch
tests/download_file.cc
u_nova_utils_swift
u_nova_utils_Md5
u_nova_Log
: <linkflags>$(EXE_LINK_FLAGS)
;
# Run this to manually test the monitoring calls
exe centi-pete
: pch
static_dependencies
u_nova_guest_monitoring_Status
u_nova_guest_monitoring_Monitoring
u_nova_process
src/centi_pete.cc
:
<linkflags>$(EXE_LINK_FLAGS)
;
exe format_file
: pch
u_nova_volume
u_nova_Log
tests/format.cc
: <linkflags>$(EXE_LINK_FLAGS)
;
exe mount_file
: pch
u_nova_volume
u_nova_Log