Make "make dist" package everything again.
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
# Copyright (C) 2003, 2004, 2006, 2008, 2009 Rocky Bernstein <rocky@gnu.org>
|
# Copyright (C) 2003, 2004, 2006, 2008, 2009, 2010 Rocky Bernstein <rocky@gnu.org>
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
# There's a problem with doing make distcheck for testdefault.
|
# There's a problem with doing make distcheck for testdefault.
|
||||||
# A reminder of why I hate automake.
|
# A reminder of why I hate automake.
|
||||||
|
|
||||||
SUBDIRS = driver
|
SUBDIRS = data driver
|
||||||
|
|
||||||
if BUILD_CD_PARANOIA
|
if BUILD_CD_PARANOIA
|
||||||
testparanoia=testparanoia
|
testparanoia=testparanoia
|
||||||
@@ -83,7 +83,7 @@ check_DATA = vcd_demo.right vcd_demo_vcdinfo.right \
|
|||||||
|
|
||||||
EXTRA_DIST = $(check_SCRIPTS) $(check_DATA) \
|
EXTRA_DIST = $(check_SCRIPTS) $(check_DATA) \
|
||||||
check_common_fn check_cue.sh.in check_nrg.sh.in \
|
check_common_fn check_cue.sh.in check_nrg.sh.in \
|
||||||
testbincue.c.in testpregap.c.in testnrg.c.in \
|
testpregap.c.in testnrg.c.in \
|
||||||
testgetdevices.c.in check_iso.sh.in
|
testgetdevices.c.in check_iso.sh.in
|
||||||
|
|
||||||
TESTS = $(check_PROGRAMS) $(check_SCRIPTS)
|
TESTS = $(check_PROGRAMS) $(check_SCRIPTS)
|
||||||
|
|||||||
BIN
test/data/isofs-m1.bin
Normal file
BIN
test/data/isofs-m1.bin
Normal file
Binary file not shown.
3
test/data/isofs-m1.cue
Normal file
3
test/data/isofs-m1.cue
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
FILE "ISOFS-M1.BIN" BINARY
|
||||||
|
TRACK 01 MODE1/2352
|
||||||
|
INDEX 01 00:00:00
|
||||||
1
test/driver/.gitignore
vendored
1
test/driver/.gitignore
vendored
@@ -4,6 +4,7 @@
|
|||||||
/.libs
|
/.libs
|
||||||
/Makefile
|
/Makefile
|
||||||
/Makefile.in
|
/Makefile.in
|
||||||
|
/bincue
|
||||||
/follow_symlink
|
/follow_symlink
|
||||||
/freebsd
|
/freebsd
|
||||||
/gnu_linux
|
/gnu_linux
|
||||||
|
|||||||
@@ -40,10 +40,13 @@ solaris_CFLAGS = -DDATA_DIR=\"$(DATA_DIR)\"
|
|||||||
win32_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV)
|
win32_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV)
|
||||||
win32_CFLAGS = -DDATA_DIR=\"$(DATA_DIR)\"
|
win32_CFLAGS = -DDATA_DIR=\"$(DATA_DIR)\"
|
||||||
|
|
||||||
check_PROGRAMS = bincue freebsd gnu_linux mmc osx realpath solaris win32
|
hack = bincue freebsd gnu_linux mmc osx realpath solaris win32
|
||||||
|
check_PROGRAMS = $(hack)
|
||||||
|
|
||||||
TESTS = $(check_PROGRAMS)
|
TESTS = $(check_PROGRAMS)
|
||||||
|
|
||||||
|
EXTRA_DIST = bincue.c.in
|
||||||
|
|
||||||
MOSTLYCLEANFILES = core core.* *.dump cdda-orig.wav cdda-try.wav *.raw
|
MOSTLYCLEANFILES = core core.* *.dump cdda-orig.wav cdda-try.wav *.raw
|
||||||
|
|
||||||
test: check-am
|
test: check-am
|
||||||
|
|||||||
133
test/driver/bincue.c
Normal file
133
test/driver/bincue.c
Normal file
@@ -0,0 +1,133 @@
|
|||||||
|
/* -*- C -*-
|
||||||
|
$Id: testbincue.c.in,v 1.2 2008/03/22 18:08:25 karl Exp $
|
||||||
|
|
||||||
|
Copyright (C) 2004, 2006, 2008, 2010 Rocky Bernstein <rocky@gnu.org>
|
||||||
|
|
||||||
|
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
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
Regression test for cdio_binfile().
|
||||||
|
*/
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include "config.h"
|
||||||
|
#endif
|
||||||
|
#include <cdio/cdio.h>
|
||||||
|
#include <cdio/logging.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_STDIO_H
|
||||||
|
#include <stdio.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
|
#include <sys/types.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_STDLIB_H
|
||||||
|
#include <stdlib.h>
|
||||||
|
#endif
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#ifndef DATA_DIR
|
||||||
|
#define DATA_DIR "/src/external-vcs/libcdio/test/data"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define NUM_GOOD_CUES 2
|
||||||
|
#define NUM_BAD_CUES 7
|
||||||
|
int
|
||||||
|
main(int argc, const char *argv[])
|
||||||
|
{
|
||||||
|
const char *cue_file[NUM_GOOD_CUES] = {
|
||||||
|
"cdda.cue",
|
||||||
|
"isofs-m1.cue",
|
||||||
|
};
|
||||||
|
|
||||||
|
const char *badcue_file[NUM_BAD_CUES] = {
|
||||||
|
"bad-cat1.cue",
|
||||||
|
"bad-cat2.cue",
|
||||||
|
"bad-cat3.cue",
|
||||||
|
"bad-mode1.cue",
|
||||||
|
"bad-msf-1.cue",
|
||||||
|
"bad-msf-2.cue",
|
||||||
|
"bad-msf-3.cue",
|
||||||
|
};
|
||||||
|
int ret=0;
|
||||||
|
unsigned int i;
|
||||||
|
char psz_cuefile[500];
|
||||||
|
|
||||||
|
psz_cuefile[sizeof(psz_cuefile)-1] = '\0';
|
||||||
|
cdio_loglevel_default = (argc > 1) ? CDIO_LOG_DEBUG : CDIO_LOG_INFO;
|
||||||
|
for (i=0; i<NUM_GOOD_CUES; i++) {
|
||||||
|
char *psz_binfile;
|
||||||
|
snprintf(psz_cuefile, sizeof(psz_cuefile)-1,
|
||||||
|
"%s/%s", DATA_DIR, cue_file[i]);
|
||||||
|
psz_binfile = cdio_is_cuefile(psz_cuefile);
|
||||||
|
if (!psz_binfile) {
|
||||||
|
printf("Incorrect: %s doesn't parse as a CDRWin CUE file.\n",
|
||||||
|
cue_file[i]);
|
||||||
|
ret=i+1;
|
||||||
|
} else {
|
||||||
|
printf("Correct: %s parses as a CDRWin CUE file.\n",
|
||||||
|
cue_file[i]);
|
||||||
|
free(psz_binfile);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i=0; i<NUM_BAD_CUES; i++) {
|
||||||
|
char *psz_binfile;
|
||||||
|
snprintf(psz_cuefile, sizeof(psz_cuefile)-1,
|
||||||
|
"%s/%s", DATA_DIR, badcue_file[i]);
|
||||||
|
psz_binfile=cdio_is_cuefile(psz_cuefile);
|
||||||
|
if (!psz_binfile) {
|
||||||
|
printf("Correct: %s doesn't parse as a CDRWin CUE file.\n",
|
||||||
|
badcue_file[i]);
|
||||||
|
} else {
|
||||||
|
printf("Incorrect: %s parses as a CDRWin CUE file.\n",
|
||||||
|
badcue_file[i]);
|
||||||
|
free(psz_binfile);
|
||||||
|
ret+=50*i+1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
CdIo_t *p_cdio;
|
||||||
|
snprintf(psz_cuefile, sizeof(psz_cuefile)-1,
|
||||||
|
"%s/%s", DATA_DIR, "cdda.cue");
|
||||||
|
p_cdio = cdio_open (psz_cuefile, DRIVER_UNKNOWN);
|
||||||
|
if (!p_cdio) {
|
||||||
|
printf("Can't open cdda.cue\n");
|
||||||
|
} else {
|
||||||
|
/* Just test performing some operations. */
|
||||||
|
driver_return_code_t drc = cdio_set_blocksize(p_cdio, 2048);
|
||||||
|
char *psz_device;
|
||||||
|
|
||||||
|
#ifdef HAVE_CHDIR
|
||||||
|
if (0 == chdir(DATA_DIR))
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
psz_device = cdio_get_default_device(p_cdio);
|
||||||
|
/* Could chdir to srcdir to hedge the bet? */
|
||||||
|
if (psz_device)
|
||||||
|
free(psz_device);
|
||||||
|
else {
|
||||||
|
/* Unless we do the chdir, will fail. So don't set as an error. */
|
||||||
|
printf("Can't get default device\n");
|
||||||
|
}
|
||||||
|
drc = cdio_set_speed(p_cdio, 5);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user