diff options
| author | Peter Jones <pjones@redhat.com> | 2008-06-04 13:49:18 -0400 |
|---|---|---|
| committer | Peter Jones <pjones@pjones2.localdomain> | 2008-06-04 13:49:18 -0400 |
| commit | 5b40b18bc716853e7b3ec4b2b746913d237c8150 (patch) | |
| tree | bc6ea4493fb948237acdb5267670a0975bf9fd12 /src | |
| parent | d3c681f1b61071a6e410bcf859b34ebfc0677fa8 (diff) | |
Remove ply-copy-dir-test.
Diffstat (limited to 'src')
| -rw-r--r-- | src/libply/tests/Makefile.am | 1 | ||||
| -rw-r--r-- | src/libply/tests/ply-copy-dir-test.am | 11 | ||||
| -rw-r--r-- | src/libply/tests/ply-copy-dir-test.c | 84 |
3 files changed, 0 insertions, 96 deletions
diff --git a/src/libply/tests/Makefile.am b/src/libply/tests/Makefile.am index 879fd89..5f5287c 100644 --- a/src/libply/tests/Makefile.am +++ b/src/libply/tests/Makefile.am @@ -13,7 +13,6 @@ include $(srcdir)/ply-logger-test.am include $(srcdir)/ply-array-test.am include $(srcdir)/ply-list-test.am include $(srcdir)/ply-event-loop-test.am -include $(srcdir)/ply-copy-dir-test.am endif noinst_PROGRAMS = $(TESTS) diff --git a/src/libply/tests/ply-copy-dir-test.am b/src/libply/tests/ply-copy-dir-test.am deleted file mode 100644 index 2d97937..0000000 --- a/src/libply/tests/ply-copy-dir-test.am +++ /dev/null @@ -1,11 +0,0 @@ -TESTS += ply-copy-dir-test - -ply_copy_dir_test_CFLAGS = $(PLYMOUTH_CFLAGS) -ply_copy_dir_test_LDADD = $(PLYMOUTH_LIBS) - -ply_copy_dir_test_SOURCES = \ - $(srcdir)/../ply-logger.h \ - $(srcdir)/../ply-logger.c \ - $(srcdir)/../ply-utils.h \ - $(srcdir)/../ply-utils.c \ - $(srcdir)/ply-copy-dir-test.c diff --git a/src/libply/tests/ply-copy-dir-test.c b/src/libply/tests/ply-copy-dir-test.c deleted file mode 100644 index 63bd900..0000000 --- a/src/libply/tests/ply-copy-dir-test.c +++ /dev/null @@ -1,84 +0,0 @@ -/* ply-copy-dir-test.c - tests some of the copy utility functions - * - * Copyright (C) 2007 Red Hat, Inc. - * - * This file 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 2 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, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. - * - * Written by: Ray Strode <rstrode@redhat.com> - */ -#include "config.h" - -#include <stdbool.h> -#include <stdint.h> -#include <stdio.h> -#include <stdlib.h> - -#include "ply-utils.h" - -bool -test_dir_copy (void) -{ - int dir_fd; - - if (!ply_create_directory ("test-dir-copy-source")) - return false; - - system ("cp ../* test-dir-copy-source"); - - if (!ply_create_directory ("test-dir-copy-dest")) - return false; - - if (!ply_copy_directory ("test-dir-copy-source", "test-dir-copy-dest")) - return false; - - if (!ply_create_directory ("/foo/test-dir-copy-scratch")) - return false; - - if (!ply_mount_tmpfs ("/foo/test-dir-copy-scratch")) - return false; - - if (!ply_copy_directory ("test-dir-copy-dest", "/foo/test-dir-copy-scratch")) - return false; - - system ("ls /foo/test-dir-copy-scratch"); - - dir_fd = open ("/foo/test-dir-copy-scratch", O_RDONLY); - if (dir_fd < 0) - { - umount("/foo/test-dir-copy-scratch"); - return false; - } - - umount("/foo/test-dir-copy-scratch"); - - if (fchdir (dir_fd) != 0) { - return false; - - system ("ls"); - - return true; -} - -int -main (int argc, - char **argv) -{ - if (!test_dir_copy ()) - return 1; - - return 0; -} -/* vim: set ts=4 sw=4 expandtab autoindent cindent cino={.5s,(0: */ |
