From 74b0b023f4aad4832bdf2e9df3752c5ff2e65dc6 Mon Sep 17 00:00:00 2001 From: "R. Bernstein" Date: Wed, 26 Sep 2012 13:36:59 -0400 Subject: Add "make check-short" target to run tests without bloated output. --- Makefile.am | 7 +++- example/Makefile.am | 10 ++++- example/README | 16 ++++++-- example/cdchange.c | 2 +- example/cdtext.c | 16 ++++---- example/device.c | 49 ++++++++++++----------- example/drives.c | 17 ++++---- example/extract.c | 4 +- example/isofuzzy.c | 4 +- example/mmc1.c | 14 +++---- example/mmc2.c | 48 +++++++++++----------- example/mmc2a.c | 101 +++++++++++++++++++++++++---------------------- example/mmc3.c | 32 ++++++++------- example/sample4.c | 4 +- make-check-filter.rb | 27 +++++++++++++ test/Makefile.am | 5 +++ test/check_common_fn.in | 10 ++--- test/check_cue.sh.in | 14 +++---- test/check_nrg.sh.in | 6 +-- test/check_sizeof.c | 4 +- test/driver/Makefile.am | 4 ++ test/driver/realpath.c | 2 +- test/testgetdevices.c.in | 22 ++++++----- test/testischar.c | 9 ++--- test/testisocd.c | 2 +- test/testpregap.c.in | 8 ++-- 26 files changed, 253 insertions(+), 184 deletions(-) create mode 100755 make-check-filter.rb diff --git a/Makefile.am b/Makefile.am index 4df3808f..67ecfeb2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -33,6 +33,7 @@ EXTRA_DIST = \ libiso9660.pc.in \ libiso9660++.pc.in \ libudf.pc.in \ + make-check-filter.rb \ package/libcdio.spec.in SUBDIRS = doc include lib src test example @@ -65,9 +66,13 @@ REGRESSION_VERSION = 1.1 distdir_regression = ../$(PACKAGE)-$(REGRESSION_VERSION)-tests -#: run regression tests +#: run regression tests. "test" is the same thing as "check" test: check +#: Run all tests without bloated output +check-short: + $(MAKE) check 2>&1 | ruby @abs_top_srcdir@/make-check-filter.rb + #: Make documentation via Doxygen http://www.stack.nl/~dimitri/doxygen/ doxygen: -( cd ${top_srcdir}/doc/doxygen && /bin/sh ${srcdir}/run_doxygen ) diff --git a/example/Makefile.am b/example/Makefile.am index 2782dfa4..086d694d 100644 --- a/example/Makefile.am +++ b/example/Makefile.am @@ -1,4 +1,4 @@ -# Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 +# Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009, 2012 # Rocky Bernstein # # This program is free software: you can redistribute it and/or modify @@ -50,6 +50,14 @@ noinst_PROGRAMS = \ check_PROGRAMS = cdtext device drives \ mmc1 mmc2 mmc2a mmc3 sample4 +#: run regression tests. "test" is the same thing as "check" +test: check-am + +#: Run all tests without bloated output +check-short: + $(MAKE) check 2>&1 | ruby @abs_top_srcdir@/make-check-filter.rb + + INCLUDES = $(LIBCDIO_CFLAGS) audio_DEPENDENCIES = $(LIBCDIO_DEPS) diff --git a/example/README b/example/README index 4a675ba3..6fceee63 100644 --- a/example/README +++ b/example/README @@ -29,6 +29,10 @@ cdio-eject.c: a stripped-down "eject" command to open or close a CDROM cdtext.c: A program to show CD-Text and CD disc mode info. +device.c: A program to show drivers installed and what the default + CD-ROM drive is. See also corresponding C++ programs of similar + names. + discid.c: http://sourceforge.net/projects/discid/ using libcdio: a small program to calculate the disc-ID for audio compact discs. The disc-ID can be used to query info @@ -66,6 +70,9 @@ mmc2.c: A more involved MMC command to list features from mmc2a.c: Show MODE_SENSE page 2A paramaters: CD/DVD Capabilities and Mechanical Status Page +mmc3.c Another simple program to show use of SCSI MMC interface. + Is basically the the libdio scsi_mmc_get_hwinfo() routine. + paranoia: A program to show using CD-DA paranoia (a library for jitter detection and audio-read error correction). This program uses an interface compatible (mostly) with cdparanoia. It looks for @@ -77,9 +84,6 @@ paranoia2: Another program to show using CD-DA paranoia using a more things that otherwise use libcdio such as media players (e.g. for getting CDDB or CD-Text info) -sample2.c: A simple program to show drivers installed and what the - default CD-ROM drive is. - sample3.c: A simple program to show the use of cdio_guess_cd_type(). Figure out the kind of CD image we've got. @@ -95,5 +99,11 @@ udf1.c: A program to show using libudf to list files in a directory of udf2.c: A program to show using libudf to extract a file from an UDF image. +udffile.c A program to show using libudf to extract a file. + Many of the above programs can be compiled in C++. See that directory for C++ examples which include some of the above. + +Some of these programs are also used in testing. When this occurs, +output is prepended with -- so it can be filtered out by Ruby program +make-check-filter.rb when running "make check-short". diff --git a/example/cdchange.c b/example/cdchange.c index 240263b5..f9ffabd8 100644 --- a/example/cdchange.c +++ b/example/cdchange.c @@ -1,5 +1,5 @@ /* - Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 + Copyright (C) 2005-2012 Rocky Bernstein This program is free software: you can redistribute it and/or modify diff --git a/example/cdtext.c b/example/cdtext.c index 82699e78..edd9ffd0 100644 --- a/example/cdtext.c +++ b/example/cdtext.c @@ -39,7 +39,7 @@ print_cdtext_track_info(cdtext_t *cdtext, track_t i_track) { for (i=0; i < MAX_CDTEXT_FIELDS; i++) { if (cdtext_get_const(cdtext, i, i_track)) { - printf("\t%s: %s\n", cdtext_field2str(i), + printf("-- \t%s: %s\n", cdtext_field2str(i), cdtext_get_const(cdtext, i, i_track)); } } @@ -55,11 +55,11 @@ print_disc_info(CdIo_t *p_cdio) { cdtext_t *cdtext = cdio_get_cdtext (p_cdio); int i; - printf("Discmode: %s\n\n", discmode2str[cd_discmode]); + printf("-- Discmode: %s\n\n", discmode2str[cd_discmode]); if (NULL == cdtext) { - printf("No CD-Text found on Disc.\n"); + printf("-- No CD-Text found on Disc.\n"); return; } @@ -67,7 +67,7 @@ print_disc_info(CdIo_t *p_cdio) { { cdtext_lang_t *languages; - printf("CD-Text available in: "); + printf("-- CD-Text available in: "); languages = cdtext_list_languages(cdtext); for(i=0; i<8; i++) @@ -78,18 +78,18 @@ print_disc_info(CdIo_t *p_cdio) { /* select language */ if(cdtext_select_language(cdtext, EXAMPLE_PREF_LANG)) { - printf("%s selected.\n", cdtext_lang2str (EXAMPLE_PREF_LANG)); + printf("-- %s selected.\n", cdtext_lang2str (EXAMPLE_PREF_LANG)); } else { - printf("'%s' is not available. Using '%s'\n", + printf("-- '%s' is not available. Using '%s'\n", cdtext_lang2str (EXAMPLE_PREF_LANG), cdtext_lang2str (cdtext_get_language (cdtext))); } /* print cd-text */ - printf("CD-Text for Disc:\n"); + printf("-- CD-Text for Disc:\n"); print_cdtext_track_info(cdtext, 0); for (i=i_first_track ; i < i_last_track; i++ ) { - printf("CD-Text for Track %d:\n", i); + printf("-- CD-Text for Track %d:\n", i); print_cdtext_track_info(cdtext, i); } } diff --git a/example/device.c b/example/device.c index 0fd005ea..afc3b83a 100644 --- a/example/device.c +++ b/example/device.c @@ -1,5 +1,6 @@ /* - Copyright (C) 2003, 2004, 2005, 2008, 2009 Rocky Bernstein + Copyright (C) 2003, 2004, 2005, 2008, 2009, 2012 + Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -46,25 +47,25 @@ print_drive_capabilities(cdio_drive_read_cap_t i_read_cap, if (CDIO_DRIVE_CAP_ERROR == i_misc_cap) { printf("Error in getting drive hardware properties\n"); } else { - printf(_("Hardware : %s\n"), + printf(_("-- Hardware : %s\n"), i_misc_cap & CDIO_DRIVE_CAP_MISC_FILE ? "Disk Image" : "CD-ROM or DVD"); - printf(_("Can eject : %s\n"), + printf(_("-- Can eject : %s\n"), i_misc_cap & CDIO_DRIVE_CAP_MISC_EJECT ? "Yes" : "No"); - printf(_("Can close tray : %s\n"), + printf(_("-- Can close tray : %s\n"), i_misc_cap & CDIO_DRIVE_CAP_MISC_CLOSE_TRAY ? "Yes" : "No"); - printf(_("Can disable manual eject : %s\n"), + printf(_("-- Can disable manual eject : %s\n"), i_misc_cap & CDIO_DRIVE_CAP_MISC_LOCK ? "Yes" : "No"); - printf(_("Can select juke-box disc : %s\n\n"), + printf(_("-- Can select juke-box disc : %s\n\n"), i_misc_cap & CDIO_DRIVE_CAP_MISC_SELECT_DISC ? "Yes" : "No"); - printf(_("Can set drive speed : %s\n"), + printf(_("-- Can set drive speed : %s\n"), i_misc_cap & CDIO_DRIVE_CAP_MISC_SELECT_SPEED ? "Yes" : "No"); - printf(_("Can detect if CD changed : %s\n"), + printf(_("-- Can detect if CD changed : %s\n"), i_misc_cap & CDIO_DRIVE_CAP_MISC_MEDIA_CHANGED ? "Yes" : "No"); - printf(_("Can read multiple sessions : %s\n"), + printf(_("-- Can read multiple sessions : %s\n"), i_misc_cap & CDIO_DRIVE_CAP_MISC_MULTI_SESSION ? "Yes" : "No"); - printf(_("Can hard reset device : %s\n\n"), + printf(_("-- Can hard reset device : %s\n\n"), i_misc_cap & CDIO_DRIVE_CAP_MISC_RESET ? "Yes" : "No"); } @@ -72,14 +73,14 @@ print_drive_capabilities(cdio_drive_read_cap_t i_read_cap, if (CDIO_DRIVE_CAP_ERROR == i_read_cap) { printf("Error in getting drive reading properties\n"); } else { - printf("Reading....\n"); - printf(_(" Can play audio : %s\n"), + printf("-- Reading....\n"); + printf(_("-- Can play audio : %s\n"), i_read_cap & CDIO_DRIVE_CAP_READ_AUDIO ? "Yes" : "No"); - printf(_(" Can read CD-R : %s\n"), + printf(_("-- Can read CD-R : %s\n"), i_read_cap & CDIO_DRIVE_CAP_READ_CD_R ? "Yes" : "No"); - printf(_(" Can read CD-RW : %s\n"), + printf(_("-- Can read CD-RW : %s\n"), i_read_cap & CDIO_DRIVE_CAP_READ_CD_RW ? "Yes" : "No"); - printf(_(" Can read DVD-ROM : %s\n"), + printf(_("-- Can read DVD-ROM : %s\n"), i_read_cap & CDIO_DRIVE_CAP_READ_DVD_ROM ? "Yes" : "No"); } @@ -87,12 +88,12 @@ print_drive_capabilities(cdio_drive_read_cap_t i_read_cap, if (CDIO_DRIVE_CAP_ERROR == i_write_cap) { printf("Error in getting drive writing properties\n"); } else { - printf("\nWriting....\n"); - printf(_(" Can write CD-RW : %s\n"), + printf("\n-- Writing....\n"); + printf(_("-- Can write CD-RW : %s\n"), i_read_cap & CDIO_DRIVE_CAP_READ_CD_RW ? "Yes" : "No"); - printf(_(" Can write DVD-R : %s\n"), + printf(_("-- Can write DVD-R : %s\n"), i_write_cap & CDIO_DRIVE_CAP_READ_DVD_R ? "Yes" : "No"); - printf(_(" Can write DVD-RAM : %s\n"), + printf(_("-- Can write DVD-RAM : %s\n"), i_write_cap & CDIO_DRIVE_CAP_READ_DVD_RAM ? "Yes" : "No"); } } @@ -108,10 +109,10 @@ main(int argc, const char *argv[]) cdio_drive_write_cap_t i_write_cap; cdio_drive_misc_cap_t i_misc_cap; - printf("The driver selected is %s\n", cdio_get_driver_name(p_cdio)); + printf("-- The driver selected is %s\n", cdio_get_driver_name(p_cdio)); if (default_device) - printf("The default device for this driver is %s\n", default_device); + printf("-- The default device for this driver is %s\n", default_device); cdio_get_drive_cap(p_cdio, &i_read_cap, &i_write_cap, &i_misc_cap); print_drive_capabilities(i_read_cap, i_write_cap, i_misc_cap); @@ -121,16 +122,16 @@ main(int argc, const char *argv[]) printf("\n"); } else { - printf("Problem in trying to find a driver.\n\n"); + printf("-- Problem in trying to find a driver.\n\n"); } { const driver_id_t *driver_id_p; for (driver_id_p=cdio_drivers; *driver_id_p!=DRIVER_UNKNOWN; driver_id_p++) if (cdio_have_driver(*driver_id_p)) - printf("We have: %s\n", cdio_driver_describe(*driver_id_p)); + printf("-- We have: %s\n", cdio_driver_describe(*driver_id_p)); else - printf("We don't have: %s\n", cdio_driver_describe(*driver_id_p)); + printf("-- We don't have: %s\n", cdio_driver_describe(*driver_id_p)); } return 0; } diff --git a/example/drives.c b/example/drives.c index b28d2797..cfa9722d 100644 --- a/example/drives.c +++ b/example/drives.c @@ -1,5 +1,6 @@ /* - Copyright (C) 2003, 2004, 2006, 2008, 2009 Rocky Bernstein + Copyright (C) 2003, 2004, 2006, 2008, 2009, 2012 + Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -52,11 +53,11 @@ static void print_drive_class(const char *psz_msg, cdio_fs_anal_t bitmask, bool b_any) { char **ppsz_cd_drives=NULL, **c; - printf("%s...\n", psz_msg); + printf("-- %s...\n", psz_msg); ppsz_cd_drives = cdio_get_devices_with_cap(NULL, bitmask, b_any); if (NULL != ppsz_cd_drives) for( c = ppsz_cd_drives; *c != NULL; c++ ) { - printf("Drive %s\n", *c); + printf("-- Drive %s\n", *c); } cdio_free_device_list(ppsz_cd_drives); @@ -74,7 +75,7 @@ main(int argc, const char *argv[]) ppsz_cd_drives = cdio_get_devices(DRIVER_DEVICE); if (NULL != ppsz_cd_drives) for( c = ppsz_cd_drives; *c != NULL; c++ ) { - printf("Drive %s\n", *c); + printf("-- Drive %s\n", *c); } cdio_free_device_list(ppsz_cd_drives); @@ -83,12 +84,12 @@ main(int argc, const char *argv[]) printf("-----\n"); /* Print out a list of CD-drives the harder way. */ - print_drive_class("All CD-ROM drives (again)", CDIO_FS_MATCH_ALL, false); - print_drive_class("CD-ROM drives with a CD-DA loaded...", + print_drive_class("-- All CD-ROM drives (again)", CDIO_FS_MATCH_ALL, false); + print_drive_class("-- CD-ROM drives with a CD-DA loaded...", CDIO_FS_AUDIO, false); - print_drive_class("CD-ROM drives with some sort of ISO 9660 filesystem...", + print_drive_class("-- CD-ROM drives with some sort of ISO 9660 filesystem...", CDIO_FS_ANAL_ISO9660_ANY, true); - print_drive_class("(S)VCD drives...", CDIO_FS_ANAL_VCD_ANY, true); + print_drive_class("-- (S)VCD drives...", CDIO_FS_ANAL_VCD_ANY, true); return 0; } diff --git a/example/extract.c b/example/extract.c index dd6164e0..22229e40 100644 --- a/example/extract.c +++ b/example/extract.c @@ -112,7 +112,7 @@ static int udf_extract_files(udf_t *p_udf, udf_dirent_t *p_udf_dirent, const cha if (i_length < 0) { goto out; } - printf("Extracting: %s\n", psz_fullpath); + printf("-- Extracting: %s\n", psz_fullpath); if (udf_is_dir(p_udf_dirent)) { _mkdir(psz_fullpath); p_udf_dirent2 = udf_opendir(p_udf_dirent); @@ -256,7 +256,7 @@ int main(int argc, char** argv) psz_extract_dir = argv[2]; if (_mkdir(psz_extract_dir) == 0) { - printf("Creating directory: %s\n", psz_extract_dir); + printf("-- Creating directory: %s\n", psz_extract_dir); } else if (errno != EEXIST) { fprintf(stderr, "Unable to create extraction directory %s\n", psz_extract_dir); return 1; diff --git a/example/isofuzzy.c b/example/isofuzzy.c index 138e1fcf..cffe9b3e 100644 --- a/example/isofuzzy.c +++ b/example/isofuzzy.c @@ -68,7 +68,7 @@ main(int argc, const char *argv[]) p_iso = iso9660_open_fuzzy (psz_fname, 5); if (NULL == p_iso) { - fprintf(stderr, "Sorry, could not find an ISO 9660 image from %s\n", + fprintf(stderr, "-- Sorry, could not find an ISO 9660 image from %s\n", psz_fname); return 1; } @@ -84,7 +84,7 @@ main(int argc, const char *argv[]) iso9660_stat_t *p_statbuf = (iso9660_stat_t *) _cdio_list_node_data (entnode); iso9660_name_translate(p_statbuf->filename, filename); - printf ("/%s\n", filename); + printf ("-- /%s\n", filename); } _cdio_list_free (entlist, true); diff --git a/example/mmc1.c b/example/mmc1.c index 08bfddc8..29991e78 100644 --- a/example/mmc1.c +++ b/example/mmc1.c @@ -1,5 +1,5 @@ /* - Copyright (C) 2004, 2005, 2008, 2009, 2010, 2011 + Copyright (C) 2004, 2005, 2008, 2009, 2010, 2011, 2012 Rocky Bernstein This program is free software: you can redistribute it and/or modify @@ -53,7 +53,7 @@ main(int argc, const char *argv[]) p_cdio = cdio_open (psz_drive, DRIVER_UNKNOWN); if (!p_cdio) { - printf("Couldn't find CD\n"); + printf("-- Couldn't find CD\n"); return 77; } else { int i_status; /* Result of MMC command */ @@ -81,10 +81,10 @@ main(int argc, const char *argv[]) sizeof(psz_rev)-1); psz_rev[sizeof(psz_rev)-1] = '\0'; - printf("Vendor: %s\nModel: %s\nRevision: %s\n", + printf("-- Vendor: %s\n-- Model: %s\n-- Revision: %s\n", psz_vendor, psz_model, psz_rev); } else { - printf("Couldn't get INQUIRY data (vendor, model, and revision).\n"); + printf("-- Couldn't get INQUIRY data (vendor, model, and revision).\n"); } { @@ -94,13 +94,13 @@ main(int argc, const char *argv[]) i_status = mmc_get_disc_erasable(p_cdio, &b_erasable); cdio_mmc_feature_profile_t disctype; if (DRIVER_OP_SUCCESS == i_status) - printf("Disc is %serasable.\n", b_erasable ? "" : "not "); + printf("-- Disc is %serasable.\n", b_erasable ? "" : "not "); else - printf("Can't determine if disc is erasable.\n"); + printf("-- Can't determine if disc is erasable.\n"); i_status = mmc_get_disctype(p_cdio, 0, &disctype); if (DRIVER_OP_SUCCESS == i_status) { - printf("disc type: profile is %s (0x%X)\n", + printf("-- disc type: profile is %s (0x%X)\n", mmc_feature_profile2str(disctype), disctype); } diff --git a/example/mmc2.c b/example/mmc2.c index e98cd0fd..f950b020 100644 --- a/example/mmc2.c +++ b/example/mmc2.c @@ -1,5 +1,5 @@ /* - Copyright (C) 2004, 2005, 2008, 2009 Rocky Bernstein + Copyright (C) 2004, 2005, 2008, 2009, 2012 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -46,7 +46,7 @@ main(int argc, const char *argv[]) p_cdio = cdio_open (psz_drive, DRIVER_DEVICE); if (NULL == p_cdio) { - printf("Couldn't find CD\n"); + printf("-- Couldn't find CD\n"); return 77; } else { int i_status; /* Result of MMC command */ @@ -76,7 +76,7 @@ main(int argc, const char *argv[]) { uint8_t *q; const char *feature_str = mmc_feature2str(i_feature); - printf("%s Feature\n", feature_str); + printf("-- %s Feature\n", feature_str); switch( i_feature ) { case CDIO_MMC_FEATURE_PROFILE_LIST: @@ -84,7 +84,7 @@ main(int argc, const char *argv[]) int i_profile=CDIO_MMC_GET_LEN16(q); const char *feature_profile_str = mmc_feature_profile2str(i_profile); - printf( "\t%s", feature_profile_str ); + printf( "-- \t%s", feature_profile_str ); if (q[2] & 1) { printf(" - on"); } @@ -99,22 +99,22 @@ main(int argc, const char *argv[]) uint32_t i_interface_standard = CDIO_MMC_GET_LEN32(q); switch(i_interface_standard) { case 0: - printf("\tunspecified interface.\n"); + printf("-- \tunspecified interface.\n"); break; case 1: - printf("\tSCSI interface.\n"); + printf("-- \tSCSI interface.\n"); break; case 2: - printf("\tATAPI interface.\n"); + printf("-- \tATAPI interface.\n"); break; case 3: - printf("\tIEEE 1394 interface.\n"); + printf("-- \tIEEE 1394 interface.\n"); break; case 4: - printf("\tIEEE 1394A interface.\n"); + printf("-- \tIEEE 1394A interface.\n"); break; case 5: - printf("\tFibre Channel interface.\n"); + printf("-- \tFibre Channel interface.\n"); } printf("\n"); break; @@ -122,36 +122,36 @@ main(int argc, const char *argv[]) case CDIO_MMC_FEATURE_REMOVABLE_MEDIUM: switch(p[4] >> 5) { case 0: - printf("\tCaddy/Slot type loading mechanism,\n"); + printf("-- \tCaddy/Slot type loading mechanism,\n"); break; case 1: - printf("\tTray type loading mechanism,\n"); + printf("-- \tTray type loading mechanism,\n"); break; case 2: - printf("\tPop-up type loading mechanism,\n"); + printf("-- \tPop-up type loading mechanism,\n"); break; case 4: - printf("\tEmbedded changer with individually changeable discs,\n"); + printf("-- \tEmbedded changer with individually changeable discs,\n"); break; case 5: - printf("\tEmbedded changer using a magazine mechanism,\n"); + printf("-- \tEmbedded changer using a magazine mechanism,\n"); break; default: - printf("\tUnknown changer mechanism,\n"); + printf("-- \tUnknown changer mechanism,\n"); } - printf("\tcan%s eject the medium or magazine via the normal " + printf("-- \tcan%s eject the medium or magazine via the normal " "START/STOP command,\n", (p[4] & 8) ? "": "not"); - printf("\tcan%s be locked into the Logical Unit.\n", + printf("-- \tcan%s be locked into the Logical Unit.\n", (p[4] & 1) ? "": "not"); printf("\n"); break; case CDIO_MMC_FEATURE_CD_READ: - printf("CD Read Feature\n"); - printf("\tC2 Error pointers are %ssupported,\n", + printf("-- CD Read Feature\n"); + printf("-- \tC2 Error pointers are %ssupported,\n", (p[4] & 2) ? "": "not "); - printf("\tCD-Text is %ssupported.\n", + printf("-- \tCD-Text is %ssupported.\n", (p[4] & 1) ? "": "not "); printf("\n"); break; @@ -184,14 +184,14 @@ main(int argc, const char *argv[]) } } } else { - printf("Didn't get all feature codes.\n"); + printf("-- Didn't get all feature codes.\n"); } } if (mmc_have_interface(p_cdio, CDIO_MMC_FEATURE_INTERFACE_ATAPI)) - printf("CD-ROM is an ATAPI interface.\n"); + printf("-- CD-ROM is an ATAPI interface.\n"); else - printf("CD-ROM is not an ATAPI interface.\n"); + printf("-- CD-ROM is not an ATAPI interface.\n"); cdio_destroy(p_cdio); diff --git a/example/mmc2a.c b/example/mmc2a.c index b90a87be..88f184f6 100644 --- a/example/mmc2a.c +++ b/example/mmc2a.c @@ -1,5 +1,5 @@ /* - Copyright (C) 2006, 2008, 2009, 2010, 2011 + Copyright (C) 2006, 2008-2012 Rocky Bernstein This program is free software: you can redistribute it and/or modify @@ -47,105 +47,105 @@ static void print_mode_sense (const char *psz_drive, const char *six_or_ten, const uint8_t buf[30]) { - printf("Mode sense %s information for %s:\n", six_or_ten, psz_drive); + printf("-- Mode sense %s information for %s:\n", six_or_ten, psz_drive); if (buf[2] & 0x01) { - printf("\tReads CD-R media.\n"); + printf("-- \tReads CD-R media.\n"); } if (buf[2] & 0x02) { - printf("\tReads CD-RW media.\n"); + printf("-- \tReads CD-RW media.\n"); } if (buf[2] & 0x04) { - printf("\tReads fixed-packet tracks when Addressing type is method 2.\n"); + printf("-- \tReads fixed-packet tracks when Addressing type is method 2.\n"); } if (buf[2] & 0x08) { - printf("\tReads DVD ROM media.\n"); + printf("-- \tReads DVD ROM media.\n"); } if (buf[2] & 0x10) { - printf("\tReads DVD-R media.\n"); + printf("-- \tReads DVD-R media.\n"); } if (buf[2] & 0x20) { - printf("\tReads DVD-RAM media.\n"); + printf("-- \tReads DVD-RAM media.\n"); } if (buf[2] & 0x40) { - printf("\tReads DVD-RAM media.\n"); + printf("-- \tReads DVD-RAM media.\n"); } if (buf[3] & 0x01) { - printf("\tWrites CD-R media.\n"); + printf("-- \tWrites CD-R media.\n"); } if (buf[3] & 0x02) { - printf("\tWrites CD-RW media.\n"); + printf("-- \tWrites CD-RW media.\n"); } if (buf[3] & 0x04) { - printf("\tSupports emulation write.\n"); + printf("-- \tSupports emulation write.\n"); } if (buf[3] & 0x10) { - printf("\tWrites DVD-R media.\n"); + printf("-- \tWrites DVD-R media.\n"); } if (buf[3] & 0x20) { - printf("\tWrites DVD-RAM media.\n"); + printf("-- \tWrites DVD-RAM media.\n"); } if (buf[4] & 0x01) { - printf("\tCan play audio.\n"); + printf("-- \tCan play audio.\n"); } if (buf[4] & 0x02) { - printf("\tDelivers composition A/V stream.\n"); + printf("-- \tDelivers composition A/V stream.\n"); } if (buf[4] & 0x04) { - printf("\tSupports digital output on port 2.\n"); + printf("-- \tSupports digital output on port 2.\n"); } if (buf[4] & 0x08) { - printf("\tSupports digital output on port 1.\n"); + printf("-- \tSupports digital output on port 1.\n"); } if (buf[4] & 0x10) { - printf("\tReads Mode-2 form 1 (e.g. XA) media.\n"); + printf("-- \tReads Mode-2 form 1 (e.g. XA) media.\n"); } if (buf[4] & 0x20) { - printf("\tReads Mode-2 form 2 media.\n"); + printf("-- \tReads Mode-2 form 2 media.\n"); } if (buf[4] & 0x40) { - printf("\tReads multi-session CD media.\n"); + printf("-- \tReads multi-session CD media.\n"); } if (buf[4] & 0x80) { - printf("\tSupports Buffer under-run free recording on CD-R/RW media.\n"); + printf("-- \tSupports Buffer under-run free recording on CD-R/RW media.\n"); } if (buf[4] & 0x01) { - printf("\tCan read audio data with READ CD.\n"); + printf("-- \tCan read audio data with READ CD.\n"); } if (buf[4] & 0x02) { - printf("\tREAD CD data stream is accurate.\n"); + printf("-- \tREAD CD data stream is accurate.\n"); } if (buf[5] & 0x04) { - printf("\tReads R-W subchannel information.\n"); + printf("-- \tReads R-W subchannel information.\n"); } if (buf[5] & 0x08) { - printf("\tReads de-interleaved R-W subchannel.\n"); + printf("-- \tReads de-interleaved R-W subchannel.\n"); } if (buf[5] & 0x10) { printf("\tSupports C2 error pointers.\n"); } if (buf[5] & 0x20) { - printf("\tReads ISRC information.\n"); + printf("-- \tReads ISRC information.\n"); } if (buf[5] & 0x40) { - printf("\tReads ISRC informaton.\n"); + printf("-- \tReads ISRC informaton.\n"); } if (buf[5] & 0x40) { - printf("\tReads media catalog number (MCN also known as UPC).\n"); + printf("-- \tReads media catalog number (MCN also known as UPC).\n"); } if (buf[5] & 0x80) { - printf("\tReads bar codes.\n"); + printf("-- \tReads bar codes.\n"); } if (buf[6] & 0x01) { printf("\tPREVENT/ALLOW may lock media.\n"); } - printf("\tLock state is %slocked.\n", (buf[6] & 0x02) ? "" : "un"); - printf("\tPREVENT/ALLOW jumper is %spresent.\n", (buf[6] & 0x04) ? "": "not "); + printf("-- \tLock state is %slocked.\n", (buf[6] & 0x02) ? "" : "un"); + printf("-- \tPREVENT/ALLOW jumper is %spresent.\n", (buf[6] & 0x04) ? "": "not "); if (buf[6] & 0x08) { - printf("\tEjects media with START STOP UNIT.\n"); + printf("-- \tEjects media with START STOP UNIT.\n"); } { const unsigned int i_load_type = (buf[6]>>5 & 0x07); - printf("\tLoading mechanism type is %d: ", i_load_type); + printf("-- \tLoading mechanism type is %d: ", i_load_type); switch (buf[6]>>5 & 0x07) { case 0: printf("caddy type loading mechanism.\n"); @@ -175,30 +175,35 @@ print_mode_sense (const char *psz_drive, const char *six_or_ten, } if (buf[7] & 0x01) { - printf("\tVolume controls each channel separately.\n"); + printf("-- \tVolume controls each channel separately.\n"); } if (buf[7] & 0x02) { - printf("\tHas a changer that supports disc present reporting.\n"); + printf("-- \tHas a changer that supports disc present reporting.\n"); } if (buf[7] & 0x04) { - printf("\tCan load empty slot in changer.\n"); + printf("-- \tCan load empty slot in changer.\n"); } if (buf[7] & 0x08) { - printf("\tSide change capable.\n"); + printf("-- \tSide change capable.\n"); } if (buf[7] & 0x10) { - printf("\tReads raw R-W subchannel information from lead in.\n"); + printf("-- \tReads raw R-W subchannel information from lead in.\n"); } { const unsigned int i_speed_Kbs = CDIO_MMC_GETPOS_LEN16(buf, 8); - printf("\tMaximum read speed is %d K bytes/sec (about %dX)\n", + printf("-- \tMaximum read speed is %d K bytes/sec (about %dX)\n", i_speed_Kbs, i_speed_Kbs / 176) ; } - printf("\tNumber of Volume levels is %d\n", CDIO_MMC_GETPOS_LEN16(buf, 10)); - printf("\tBuffers size for data is %d KB\n", CDIO_MMC_GETPOS_LEN16(buf, 12)); - printf("\tCurrent read speed is %d KB\n", CDIO_MMC_GETPOS_LEN16(buf, 14)); - printf("\tMaximum write speed is %d KB\n", CDIO_MMC_GETPOS_LEN16(buf, 18)); - printf("\tCurrent write speed is %d KB\n", CDIO_MMC_GETPOS_LEN16(buf, 28)); + printf("-- \tNumber of Volume levels is %d\n", + CDIO_MMC_GETPOS_LEN16(buf, 10)); + printf("-- \tBuffers size for data is %d KB\n", + CDIO_MMC_GETPOS_LEN16(buf, 12)); + printf("-- \tCurrent read speed is %d KB\n", + CDIO_MMC_GETPOS_LEN16(buf, 14)); + printf("-- \tMaximum write speed is %d KB\n", + CDIO_MMC_GETPOS_LEN16(buf, 18)); + printf("-- \tCurrent write speed is %d KB\n", + CDIO_MMC_GETPOS_LEN16(buf, 28)); } @@ -212,7 +217,7 @@ main(int argc, const char *argv[]) p_cdio = cdio_open (psz_drive, DRIVER_UNKNOWN); if (!p_cdio) { - printf("Couldn't find CD\n"); + printf("-- Couldn't find CD\n"); return 77; } else { uint8_t buf[30] = { 0, }; /* Place to hold returned data */ @@ -221,13 +226,13 @@ main(int argc, const char *argv[]) CDIO_MMC_CAPABILITIES_PAGE) ) { print_mode_sense(psz_cd, "6", buf); } else { - printf("Couldn't get MODE_SENSE 6 data.\n"); + printf("-- Couldn't get MODE_SENSE 6 data.\n"); } if (DRIVER_OP_SUCCESS == mmc_mode_sense_10(p_cdio, buf, sizeof(buf), CDIO_MMC_CAPABILITIES_PAGE) ) { print_mode_sense(psz_cd, "10", buf); } else { - printf("Couldn't get MODE_SENSE 10 data.\n"); + printf("-- Couldn't get MODE_SENSE 10 data.\n"); } free(psz_cd); } diff --git a/example/mmc3.c b/example/mmc3.c index 033593ad..66a5184d 100644 --- a/example/mmc3.c +++ b/example/mmc3.c @@ -15,8 +15,8 @@ along with this program. If not, see . */ -/* Simple program to show use of SCSI MMC interface. Is basically the - the libdio scsi_mmc_get_hwinfo() routine. +/* Another simple program to show use of SCSI MMC interface. Is + basically the the libdio scsi_mmc_get_hwinfo() routine. */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -58,29 +58,29 @@ main(int argc, const char *argv[]) if (!psz_drive) { psz_drive = cdio_get_default_device_driver(&driver_id); if (!psz_drive) { - printf("Can't find a CD-ROM\n"); + printf("-- Can't find a CD-ROM\n"); exit(77); } } p_cdio = cdio_open (psz_drive, driver_id); if (!p_cdio) { - printf("Can't open %s\n", psz_drive); + printf("-- Can't open %s\n", psz_drive); exit(77); } ret = mmc_get_tray_status(p_cdio); switch((int) ret) { case 0: - printf("CD-ROM drive %s is closed.\n", psz_drive); + printf("-- CD-ROM drive %s is closed.\n", psz_drive); do_eject = true; do_close = true; break; case 1: - printf("CD-ROM drive %s is open.\n", psz_drive); + printf("-- CD-ROM drive %s is open.\n", psz_drive); break; default: - printf("Error status for drive %s: %s.\n", psz_drive, + printf("-- Error status for drive %s: %s.\n", psz_drive, cdio_driver_errmsg(ret)); return 77; } @@ -88,13 +88,14 @@ main(int argc, const char *argv[]) ret = mmc_get_media_changed(p_cdio); switch((int) ret) { case 0: - printf("CD-ROM drive %s media not changed since last test.\n", psz_drive); + printf("-- CD-ROM drive %s media not changed since last test.\n", + psz_drive); break; case 1: - printf("CD-ROM drive %s media changed since last test.\n", psz_drive); + printf("-- CD-ROM drive %s media changed since last test.\n", psz_drive); break; default: - printf("Error status for drive %s: %s.\n", psz_drive, + printf("-- Error status for drive %s: %s.\n", psz_drive, cdio_driver_errmsg(ret)); return 77; } @@ -107,10 +108,10 @@ main(int argc, const char *argv[]) ret = mmc_get_tray_status(p_cdio); switch((int) ret) { case 0: - printf("CD-ROM drive %s is closed.\n", psz_drive); + printf("-- CD-ROM drive %s is closed.\n", psz_drive); break; case 1: - printf("CD-ROM drive %s is open.\n", psz_drive); + printf("-- CD-ROM drive %s is open.\n", psz_drive); break; default: printf("Error status for drive %s: %s.\n", psz_drive, @@ -121,13 +122,14 @@ main(int argc, const char *argv[]) ret = mmc_get_media_changed(p_cdio); switch((int) ret) { case 0: - printf("CD-ROM drive %s media not changed since last test.\n", psz_drive); + printf("-- CD-ROM drive %s media not changed since last test.\n", + psz_drive); break; case 1: - printf("CD-ROM drive %s media changed since last test.\n", psz_drive); + printf("-- CD-ROM drive %s media changed since last test.\n", psz_drive); break; default: - printf("Error status for drive %s: %s.\n", psz_drive, + printf("-- Error status for drive %s: %s.\n", psz_drive, cdio_driver_errmsg(ret)); return 77; } diff --git a/example/sample4.c b/example/sample4.c index 4e75f5c4..34ae2e22 100644 --- a/example/sample4.c +++ b/example/sample4.c @@ -155,7 +155,7 @@ main(int argc, const char *argv[]) p_cdio = cdio_open (cd_image_name, DRIVER_UNKNOWN); if (NULL == p_cdio) { - printf("Problem in trying to find a driver.\n\n"); + printf("-- Problem in trying to find a driver.\n\n"); return 77; } @@ -175,7 +175,7 @@ main(int argc, const char *argv[]) /* try to find out what sort of CD we have */ if (0 == num_data) { - printf("Audio CD\n"); + printf("-- Audio CD\n"); } else { /* we have data track(s) */ cdio_iso_analysis_t cdio_iso_analysis; diff --git a/make-check-filter.rb b/make-check-filter.rb new file mode 100755 index 00000000..18179e4f --- /dev/null +++ b/make-check-filter.rb @@ -0,0 +1,27 @@ +#!/usr/bin/env ruby +# Use this to cut out the crud from make check. +# Use like this: +# make check 2>&1 | ruby ../make-check-filter.rb +# See Makefile.am +pats = '(' + + ["^ CC", + '^(re)?make\[', + "^(re)?make ", + "Making check in", + '^[+]{2} WARN: ', + '^m4/', # doesn't work always + '^configure.ac', # doesn't work always + '^ cd \.\.', # doesn't work always + '^config.status', # doesn't work always + "^ vcd_demo.right", + '^-- ', + '^-+$', + '^\s*$', + ].join('|') + ')' +# puts pats +skip_re = /#{pats}/ + +while gets() + next if $_ =~ skip_re + puts $_ +end diff --git a/test/Makefile.am b/test/Makefile.am index 6a7eef1d..a8006791 100755 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -79,8 +79,13 @@ XFAIL_TESTS = testassert MOSTLYCLEANFILES = core core.* *.dump cdda-orig.wav cdda-try.wav *.raw +#: run regression tests. "test" is the same thing as "check" test: check-am +#: Run all tests without bloated output +check-short: + $(MAKE) check 2>&1 | ruby @abs_top_srcdir@/make-check-filter.rb + # This is a really bad hack to make sure check_nrg and check_cue.sh # are executable. Automake will remake check_nrg.sh and check_cue.sh # but not run the configure default commands for them to make sure diff --git a/test/check_common_fn.in b/test/check_common_fn.in index d6d99f1d..c872e11e 100755 --- a/test/check_common_fn.in +++ b/test/check_common_fn.in @@ -46,10 +46,10 @@ check_result() { fi exit $RC else - echo "$0: $msg skipped." + echo "-- $0: $msg skipped." fi else - echo "$0: $msg ok." + echo "-- $0: $msg ok." fi } @@ -62,7 +62,7 @@ test_common() { rightfile="$4" if [ ! -x "${cmd}" ]; then - echo "$0: No ${cmd}" + echo "-- $0: No ${cmd}" return 1 fi @@ -110,7 +110,7 @@ test_iso_read() { ISO_READ="../src/iso-read@EXEEXT@" if [ ! -x ${ISO_READ} ]; then - echo "$0: No ${ISO_READ}" + echo "-- $0: No ${ISO_READ}" return 1 fi @@ -158,7 +158,7 @@ test_legal_header() { fi done < ${srcdir}/check_legal.regex rm -f ${outfile} - echo "$0: Legal header of ${cmd} ${opts} ok." + echo "-- $0: Legal header of ${cmd} ${opts} ok." } diff --git a/test/check_cue.sh.in b/test/check_cue.sh.in index 890d2e42..f771436f 100644 --- a/test/check_cue.sh.in +++ b/test/check_cue.sh.in @@ -50,10 +50,10 @@ if test -f ${abs_top_srcdir}/test/data/${fname}.bin ; then RC=$? check_result $RC "cd-info CD-Text CUE test $testnum" "${CD_INFO} $opts" else - echo "Don't see CD-Text file ${abs_top_srcdir}/test/data/${fname}.cdt. Test $testnum skipped." + echo "-- Don't see CD-Text file ${abs_top_srcdir}/test/data/${fname}.cdt. Test $testnum skipped." fi else - echo "Don't see binary file ${abs_top_srcdir}/test/data/${fname}.bin. Test $testnum skipped." + echo "-- Don't see binary file ${abs_top_srcdir}/test/data/${fname}.bin. Test $testnum skipped." fi fname=isofs-m1 @@ -72,7 +72,7 @@ if test -f ${abs_top_srcdir}/test/data/${fname}.bin ; then fi else - echo "Don't see binary file ${abs_top_srcdir}/test/data/${fname}.bin. Test $testnum skipped." + echo "-- Don't see binary file ${abs_top_srcdir}/test/data/${fname}.bin. Test $testnum skipped." fi if test -n "@HAVE_ROCK@"; then @@ -83,7 +83,7 @@ if test -n "@HAVE_ROCK@"; then RC=$? check_result $RC "cd-info TOC test $testnum" "${CD_INFO} $opts" else - echo "Don't see TOC file ${abs_top_srcdir}/test/data/${fname}.bin. Test $testnum skipped." + echo "-- Don't see TOC file ${abs_top_srcdir}/test/data/${fname}.bin. Test $testnum skipped." fi fi @@ -111,10 +111,10 @@ if test -f ${abs_top_srcdir}/test/data/${fname}.bin ; then RC=$? check_result $RC "cd-info TOC test $testnum" "${CD_INFO} $opts" else - echo "Don't see TOC file ${abs_top_srcdir}/test/data/${fname}.toc. Test $testnum skipped." + echo "-- Don't see TOC file ${abs_top_srcdir}/test/data/${fname}.toc. Test $testnum skipped." fi else - echo "Don't see BIN file ${abs_top_srcdir}/test/data/${fname}.bin. Test $testnum skipped." + echo "-- Don't see BIN file ${abs_top_srcdir}/test/data/${fname}.bin. Test $testnum skipped." fi fname=svcd_ogt_test_ntsc @@ -125,7 +125,7 @@ if test -f ${abs_top_srcdir}/test/data/${fname}.bin ; then RC=$? check_result $RC "cd-info CUE test $testnum" "${CD_INFO} $opts" else - echo "Don't see CUE file ${abs_top_srcdir}/test/data/${fname}.bin. Test $testnum skipped." + echo "-- Don't see CUE file ${abs_top_srcdir}/test/data/${fname}.bin. Test $testnum skipped." fi exit $RC diff --git a/test/check_nrg.sh.in b/test/check_nrg.sh.in index 84b7e2c8..0ae0d2e2 100755 --- a/test/check_nrg.sh.in +++ b/test/check_nrg.sh.in @@ -39,7 +39,7 @@ if test -f $nrg_file ; then RC=$? check_result $RC 'cd-info NRG test 2' else - echo "Don't see NRG file ${nrg_file}. Test skipped." + echo "-- Don't see NRG file ${nrg_file}. Test skipped." exit 0 fi @@ -51,7 +51,7 @@ if test -f $nrg_file ; then RC=$? check_result $RC "cd-info NRG $test_name" "${CD_INFO} $opts" else - echo "Don't see NRG file ${nrg_file}. Test skipped." + echo "-- Don't see NRG file ${nrg_file}. Test skipped." exit $SKIP_TEST_EXITCODE fi @@ -64,7 +64,7 @@ if test -f $nrg_file ; then check_result $RC "cd-info NRG $test_name" "${CD_INFO} $opts" exit $RC else - echo "Don't see NRG file ${nrg_file}. Test skipped." + echo "-- Don't see NRG file ${nrg_file}. Test skipped." exit $SKIP_TEST_EXITCODE fi diff --git a/test/check_sizeof.c b/test/check_sizeof.c index 10079b42..b0a3723a 100644 --- a/test/check_sizeof.c +++ b/test/check_sizeof.c @@ -38,7 +38,7 @@ #include "iso9660_private.h" #define CHECK_SIZEOF(typnam) { \ - printf ("checking sizeof (%s) ...", #typnam); \ + printf ("-- checking sizeof (%s) ...", #typnam); \ if (sizeof (typnam) != (typnam##_SIZEOF)) { \ printf ("failed!\n==> sizeof (%s) == %d (but should be %d)\n", \ #typnam, (int)sizeof(typnam), (int)(typnam##_SIZEOF)); \ @@ -47,7 +47,7 @@ } #define CHECK_SIZEOF_STRUCT(typnam) { \ - printf ("checking sizeof (struct %s) ...", #typnam); \ + printf ("-- checking sizeof (struct %s) ...", #typnam); \ if (sizeof (struct typnam) != (struct_##typnam##_SIZEOF)) { \ printf ("failed!\n==> sizeof (struct %s) == %d (but should be %d)\n", \ #typnam, (int)sizeof(struct typnam), (int)(struct_##typnam##_SIZEOF)); \ diff --git a/test/driver/Makefile.am b/test/driver/Makefile.am index b55ab70d..f4b33157 100644 --- a/test/driver/Makefile.am +++ b/test/driver/Makefile.am @@ -79,5 +79,9 @@ MOSTLYCLEANFILES = \ $(check_PROGRAMS) \ core core.* *.dump cdda-orig.wav cdda-try.wav *.raw +#: run regression tests. "test" is the same thing as "check" test: check-am +#: Run all tests without bloated output +check-short: + $(MAKE) check 2>&1 | ruby @abs_top_srcdir@/make-check-filter.rb diff --git a/test/driver/realpath.c b/test/driver/realpath.c index c182ef2d..620f0c3a 100644 --- a/test/driver/realpath.c +++ b/test/driver/realpath.c @@ -122,7 +122,7 @@ main(int argc, const char *argv[]) i_last_slash = psz_last_slash - tmp_subdir + 1; memcpy(tmp_dir, tmp_subdir, i_last_slash); tmp_dir[i_last_slash] = '\0'; - printf("Temp directory is %s\n", tmp_dir); + printf("-- Temp directory is %s\n", tmp_dir); psz_orig_file = get_temporary_name(NULL, "file"); if (NULL != psz_orig_file) { diff --git a/test/testgetdevices.c.in b/test/testgetdevices.c.in index bf376dbd..3faf6760 100755 --- a/test/testgetdevices.c.in +++ b/test/testgetdevices.c.in @@ -70,11 +70,11 @@ is_in(char **file_list, const char *file) char **p; for (p = file_list; p != NULL && *p != NULL; p++) { if (strcmp(*p, file) == 0) { - printf("File %s found as expected\n", file); + printf("-- File %s found as expected\n", file); return true; } } - printf("Can't find file %s in list\n", file); + printf("-- Can't find file %s in list\n", file); return false; } #endif @@ -116,7 +116,7 @@ main(int argc, const char *argv[]) "You should have been able to get GNU/Linux driver\n"); return 6; } else { - printf("Good! You have the GNU/Linux driver installed.\n"); + printf("-- Good! You have the GNU/Linux driver installed.\n"); } } @@ -128,7 +128,7 @@ main(int argc, const char *argv[]) "You should have been able to get Win32 driver\n"); return 6; } else { - printf("Good! You have the Win32 driver installed.\n"); + printf("-- Good! You have the Win32 driver installed.\n"); } } else if (0 == strncmp("Darwin", utsname.sysname, sizeof("Darwin"))) @@ -139,7 +139,7 @@ main(int argc, const char *argv[]) "You should have been able to get OS/X driver\n"); return 6; } else { - printf("Good! You have the OS/X driver installed.\n"); + printf("-- Good! You have the OS/X driver installed.\n"); } } else if (0 == strncmp("NetBSD", utsname.sysname, sizeof("NetBSD"))) @@ -150,7 +150,7 @@ main(int argc, const char *argv[]) "You should have been able to get NetBSD driver\n"); return 6; } else { - printf("Good! You have the OS/X driver installed.\n"); + printf("-- Good! You have the OS/X driver installed.\n"); } } } @@ -165,7 +165,7 @@ main(int argc, const char *argv[]) bincue_images = cdio_get_devices(DRIVER_BINCUE); for (imgs=bincue_images; *imgs != NULL; imgs++) { - printf("bincue image %s\n", *imgs); + printf("-- bincue image %s\n", *imgs); } if (ret != 0) return ret; @@ -174,7 +174,7 @@ main(int argc, const char *argv[]) nrg_images = cdio_get_devices(DRIVER_NRG); for (imgs=nrg_images; *imgs != NULL; imgs++) { - printf("NRG image %s\n", *imgs); + printf("-- NRG image %s\n", *imgs); } if (!is_in(nrg_images, nrg_files[0])) { @@ -184,9 +184,11 @@ main(int argc, const char *argv[]) for (i=0; i<2; i++) { if (is_in(bincue_images, cue_files[i])) { - printf("%s parses as a CDRWIN BIN/CUE csheet.\n", cue_files[i]); + printf("-- %s parses as a CDRWIN BIN/CUE csheet.\n", + cue_files[i]); } else { - printf("%s doesn't parse as a CDRWIN BIN/CUE csheet.\n", cue_files[i]); + printf("-- %s doesn't parse as a CDRWIN BIN/CUE csheet.\n", + cue_files[i]); ret = i+1; } } diff --git a/test/testischar.c b/test/testischar.c index 295e633d..c1249600 100644 --- a/test/testischar.c +++ b/test/testischar.c @@ -1,6 +1,4 @@ /* - $Id: testischar.c,v 1.3 2008/03/22 18:08:25 karl Exp $ - Copyright (C) 2001, 2008 Herbert Valerio Riedel This program is free software: you can redistribute it and/or modify @@ -33,7 +31,7 @@ main (int argc, const char *argv[]) { int i, j; - printf (" "); + printf ("-- "); for (j = 0; j < 0x10; j++) printf (" %1.1x", j); @@ -43,7 +41,7 @@ main (int argc, const char *argv[]) for (j = 0; j < 0x10; j++) printf (" %1.1x", j); - printf ("\n"); + printf ("\n-- "); for (i = 0; i < 0x10; i++) { @@ -66,8 +64,9 @@ main (int argc, const char *argv[]) printf (" %c", iso9660_isachar (c) ? c : ' '); } - printf ("\n"); + printf ("\n-- "); } + printf ("\n"); return 0; } diff --git a/test/testisocd.c b/test/testisocd.c index 498fd949..789d33b1 100644 --- a/test/testisocd.c +++ b/test/testisocd.c @@ -65,7 +65,7 @@ main(int argc, const char *argv[]) /* Don't need a list of CD's with CD-DA's any more. */ cdio_free_device_list(ppsz_cd_drives); } else { - printf("Unable find or access a CD-ROM drive with an ISO-9660 " + printf("-- Unable find or access a CD-ROM drive with an ISO-9660 " "filesystem.\n"); exit(SKIP_TEST_RC); } diff --git a/test/testpregap.c.in b/test/testpregap.c.in index d15bd53a..b128a7df 100644 --- a/test/testpregap.c.in +++ b/test/testpregap.c.in @@ -94,7 +94,7 @@ main(int argc, const char *argv[]) if (! (cdio_have_driver(DRIVER_NRG) && cdio_have_driver(DRIVER_BINCUE) && cdio_have_driver(DRIVER_CDRDAO)) ) { - printf("You don't have enough drivers for this test\n"); + printf("-- You don't have enough drivers for this test\n"); exit(77); } @@ -104,17 +104,17 @@ main(int argc, const char *argv[]) cdObj = cdio_open(image, DRIVER_UNKNOWN); if (!cdObj) { - printf("unrecognized image: %s\n", image); + printf("-- unrecognized image: %s\n", image); return 50; } pregap = cdio_get_track_pregap_lsn(cdObj, pregapList[i].track); if (pregap != pregapList[i].pregap) { - printf("%s should have had pregap of lsn=%d instead of lsn=%d\n", + printf("-- %s should have had pregap of lsn=%d instead of lsn=%d\n", image, pregapList[i].pregap, pregap); rc = i + 1; } else { - printf("%s had expected pregap\n", image); + printf("-- %s had expected pregap\n", image); } cdio_destroy(cdObj); -- cgit v1.2.3