mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-07 13:32:57 +00:00
Move regression tests output to tmp_check/regress
This commit is contained in:
@@ -14,12 +14,16 @@ REPO_ROOT=$(dirname "$0")
|
||||
REPO_ROOT="`( cd \"$REPO_ROOT\" && pwd )`"
|
||||
|
||||
# configure
|
||||
echo "Configiring postgres build"
|
||||
mkdir -p $REPO_ROOT/tmp_install/build
|
||||
cd $REPO_ROOT/tmp_install/build
|
||||
../../vendor/postgres/configure CFLAGS='-O0' --enable-debug --enable-cassert \
|
||||
--enable-depend --with-libxml --prefix=/
|
||||
--enable-depend --with-libxml --prefix=/ > configure.log
|
||||
|
||||
# compile
|
||||
echo "Compiling postgres"
|
||||
make -j8 -s
|
||||
export DESTDIR=$REPO_ROOT/tmp_install
|
||||
|
||||
echo "Installing postgres to $DESTDIR"
|
||||
make install -s
|
||||
|
||||
@@ -209,6 +209,12 @@ fn init_logging(conf: &PageServerConf) -> slog_scope::GlobalLoggerGuard {
|
||||
let log_file = File::create(log).unwrap_or_else(|_| panic!("Could not create log file"));
|
||||
let decorator = slog_term::PlainSyncDecorator::new(log_file);
|
||||
let drain = slog_term::CompactFormat::new(decorator).build();
|
||||
let drain = slog::Filter::new(drain, |record: &slog::Record| {
|
||||
if record.level().is_at_least(slog::Level::Info) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
let drain = std::sync::Mutex::new(drain).fuse();
|
||||
let logger = slog::Logger::root(drain, slog::o!());
|
||||
slog_scope::set_global_logger(logger)
|
||||
|
||||
@@ -269,8 +269,6 @@ impl PostgresNode {
|
||||
if check_ok && !pg_ctl.success() {
|
||||
panic!("pg_ctl failed");
|
||||
}
|
||||
|
||||
self.safe_psql("postgres", "CREATE DATABASE regression");
|
||||
}
|
||||
|
||||
pub fn start(&self) {
|
||||
@@ -335,6 +333,13 @@ impl Drop for PostgresNode {
|
||||
|
||||
pub fn regress_check(pg : &PostgresNode) {
|
||||
|
||||
pg.safe_psql("postgres", "CREATE DATABASE regression");
|
||||
|
||||
let regress_run_path = Path::new(env!("CARGO_MANIFEST_DIR"))
|
||||
.join("tmp_check/regress");
|
||||
fs::create_dir_all(regress_run_path.clone()).unwrap();
|
||||
std::env::set_current_dir(regress_run_path).unwrap();
|
||||
|
||||
let regress_build_path = Path::new(env!("CARGO_MANIFEST_DIR"))
|
||||
.join("tmp_install/build/src/test/regress");
|
||||
let regress_src_path = Path::new(env!("CARGO_MANIFEST_DIR"))
|
||||
|
||||
@@ -373,6 +373,8 @@ pub fn put_wal_record(tag: BufferTag, rec: WALRecord)
|
||||
*rel_entry = tag.blknum + 1;
|
||||
}
|
||||
|
||||
trace!("put_wal_record lsn: {}", key.lsn);
|
||||
|
||||
let oldentry = shared.pagecache.insert(key, Arc::new(entry));
|
||||
PAGECACHE.num_entries.fetch_add(1, Ordering::Relaxed);
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ async fn walreceiver_main(conf: &PageServerConf) -> Result<(), Error> {
|
||||
match replication_message? {
|
||||
ReplicationMessage::XLogData(xlog_data) => {
|
||||
|
||||
trace!("received XLogData");
|
||||
trace!("received XLogData , lsn: {}", xlog_data.wal_start());
|
||||
|
||||
// Pass the WAL data to the decoder, and see if we can decode
|
||||
// more records as a result.
|
||||
|
||||
@@ -34,12 +34,14 @@ fn test_redo_cases() {
|
||||
node.safe_psql("postgres", "INSERT INTO t SELECT generate_series(1,100000), 'payload'");
|
||||
|
||||
let count: i64 = node
|
||||
.safe_psql("postgres", "SELECT count(*) FROM t")
|
||||
.safe_psql("postgres", "SELECT sum(key) FROM t")
|
||||
.first()
|
||||
.unwrap()
|
||||
.get(0);
|
||||
|
||||
assert_eq!(count, 100000);
|
||||
println!("sum = {}", count);
|
||||
|
||||
assert_eq!(count, 5000050000);
|
||||
}
|
||||
|
||||
// Runs pg_regress on a compute node
|
||||
|
||||
Reference in New Issue
Block a user